bug65291.phpt 373 B

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