mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
22 lines
309 B
Plaintext
22 lines
309 B
Plaintext
|
--TEST--
|
||
|
GH-10709: Recursive class constant evaluation
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
class B { const C = A::C . "B"; }
|
||
|
|
||
|
spl_autoload_register(function ($class) {
|
||
|
class A { const C = "A"; }
|
||
|
var_dump(B::C);
|
||
|
});
|
||
|
|
||
|
try {
|
||
|
new B();
|
||
|
} catch (Error $e) {
|
||
|
echo $e->getMessage(), "\n";
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
string(2) "AB"
|