xref: /php-src/Zend/tests/bug41633_3.phpt (revision 9e097822)
1--TEST--
2Bug #41633.3 (Crash instantiating classes with self-referencing constants)
3--FILE--
4<?php
5class Foo {
6    const A = Foo::B;
7    const B = Foo::A;
8}
9echo Foo::A;
10?>
11--EXPECTF--
12Fatal error: Uncaught Error: Cannot declare self-referencing constant Foo::B in %s:%d
13Stack trace:
14#0 %s(%d): [constant expression]()
15#1 {main}
16  thrown in %sbug41633_3.php on line %d
17