php-src/Zend/tests/bug65291.phpt
Arpad Ray b963249456 Fixed bug #65291 - get_defined_constants() crash with __CLASS__ in trait
Also fix and test for get_defined_constants(true)
2013-07-20 11:05:13 +01:00

26 lines
355 B
PHP

--TEST--
Bug #65291 - get_defined_constants() causes PHP to crash in a very limited case.
--FILE--
<?php
trait TestTrait
{
public static function testStaticFunction()
{
return __CLASS__;
}
}
class Tester
{
use TestTrait;
}
$foo = Tester::testStaticFunction();
get_defined_constants();
get_defined_constants(true);
echo $foo;
?>
--EXPECT--
Tester