Code Inspection: Undefined class constant
Reports the references to class constants that are not declared.
In the following example, the NonExistingConstant
constant is not defined in ExampleClass
.
class ExampleClass
{
const ExistingConstant = 'foo';
}
$myVar = ExampleClass::NonExistingConstant;
Last modified: 08 December 2020