Closed
Description
Description
The following code (https://3v4l.org/la8tX):
<?php
final class Foo {
public static $foo = [
'foo' => DOES_NOT_EXIST,
];
}
new Foo();
Resulted in this output:
Fatal error: Uncaught Error: Undefined constant "DOES_NOT_EXIST" in /in/la8tX:9
Stack trace:
#0 {main}
thrown in /in/la8tX on line 9
But I expected this output instead:
Some indication that the broken constant is in line 5, because line 9 clearly does not contain any constants.
PHP Version
PHP 8.2.1
Operating System
No response