PHP error category
Variables & Constants
Variable scope and constant lookup.
Variables & Constants errors arise when variable scope and constant lookup affect an executing PHP application or its supporting service. Use the exact signature and runtime context to narrow the cause before changing configuration.
The guides in this category separate code defects from environment differences, show focused diagnostics, and favor site-scoped corrections that preserve unrelated applications.
Guides in this category
| Title | Pattern | Severity |
|---|---|---|
| Constant already defined | Warning: Constant APP_ENV already defined in %s on line %d |
warning |
| Undefined array key | Warning: Undefined array key "%s" in %s on line %d |
warning |
| Undefined constant | Fatal error: Uncaught Error: Undefined constant "APP_ENV" in %s on line %d |
fatal |
| Undefined variable | Warning: Undefined variable $userId in %s on line %d |
warning |