mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
848a6e5035
Fixes GH-10356
21 lines
363 B
PHP
21 lines
363 B
PHP
--TEST--
|
|
GH-10356: Incorrect line number of constant in constant expression
|
|
--FILE--
|
|
<?php
|
|
|
|
final class Foo {
|
|
public static $foo = [
|
|
'foo' => DOES_NOT_EXIST,
|
|
];
|
|
}
|
|
|
|
new Foo();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Undefined constant "DOES_NOT_EXIST" in %s:5
|
|
Stack trace:
|
|
#0 %s(%d): [constant expression]()
|
|
#1 {main}
|
|
thrown in %s on line 5
|