xref: /PHP-8.0/Zend/tests/bug65291.phpt (revision f8d79582)
1--TEST--
2Bug #65291 - get_defined_constants() causes PHP to crash in a very limited case.
3--FILE--
4<?php
5
6trait TestTrait
7{
8    public static function testStaticFunction()
9    {
10        return __CLASS__;
11    }
12}
13class Tester
14{
15    use TestTrait;
16}
17
18$foo = Tester::testStaticFunction();
19get_defined_constants();
20get_defined_constants(true);
21
22echo $foo;
23?>
24--EXPECT--
25Tester
26