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
17 lines
436 B
PHP
17 lines
436 B
PHP
--TEST--
|
|
GH-7771.3 (Incorrect file/line for class constant expression exceptions)
|
|
--FILE--
|
|
<?php
|
|
$classlist = [
|
|
'space1\C' => 'class y{const y="$y";}',
|
|
'D' => 'class D{const HW=space1\C::y;}'
|
|
];
|
|
spl_autoload_register(function($class) use ($classlist) {
|
|
eval($classlist[$class]);
|
|
});
|
|
var_dump(D::HW);
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Constant expression contains invalid operations in %sgh7771_3.php(7) : eval()'d code on line 1
|
|
|