xref: /php-src/Zend/tests/gh10709.phpt (revision 7202fe16)
1--TEST--
2GH-10709: Recursive class constant evaluation
3--FILE--
4<?php
5
6class B { const C = A::C . "B"; }
7
8spl_autoload_register(function ($class) {
9    class A { const C = "A"; }
10    var_dump(B::C);
11});
12
13try {
14    new B();
15} catch (Error $e) {
16    echo $e->getMessage(), "\n";
17}
18
19?>
20--EXPECT--
21string(2) "AB"
22