xref: /PHP-8.1/Zend/tests/bug41633_3.phpt (revision d30cd7d7)
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 {main}
15  thrown in %sbug41633_3.php on line %d
16