gc_037.phpt 442 B

1234567891011121314151617181920212223242526272829303132333435
  1. --TEST--
  2. GC 037: gc_status()
  3. --INI--
  4. zend.enable_gc = 1
  5. --FILE--
  6. <?php
  7. $a = array();
  8. $a[] =& $a;
  9. unset($a);
  10. var_dump(gc_status());
  11. gc_collect_cycles();
  12. gc_collect_cycles();
  13. var_dump(gc_status());
  14. ?>
  15. --EXPECT--
  16. array(4) {
  17. ["runs"]=>
  18. int(0)
  19. ["collected"]=>
  20. int(0)
  21. ["threshold"]=>
  22. int(10001)
  23. ["roots"]=>
  24. int(1)
  25. }
  26. array(4) {
  27. ["runs"]=>
  28. int(1)
  29. ["collected"]=>
  30. int(1)
  31. ["threshold"]=>
  32. int(10001)
  33. ["roots"]=>
  34. int(0)
  35. }