bug78335.phpt 384 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Bug #78335: Static properties/variables containing cycles report as leak
  3. --FILE--
  4. <?php
  5. class Test {
  6. public static $test;
  7. public static function method() {
  8. static $foo;
  9. $foo = [&$foo];
  10. }
  11. }
  12. function test() {
  13. static $foo;
  14. $foo = [&$foo];
  15. }
  16. $foo = [&$foo];
  17. Test::$test = $foo;
  18. test();
  19. Test::method();
  20. ?>
  21. ===DONE===
  22. --EXPECT--
  23. ===DONE===