mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
While reviewing the existing tests in the `constexpr` directory, I found that some of the names were not updated to reflect the contents when the contents were changed in #9301. Follow-up to #15638
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
|