bug79792.phpt 335 B

12345678910111213141516
  1. --TEST--
  2. Bug #79792: HT iterators not removed if empty array is destroyed
  3. --FILE--
  4. <?php
  5. $a = [42];
  6. foreach ($a as &$c) {
  7. // Make the array empty.
  8. unset($a[0]);
  9. // Destroy the array.
  10. $a = null;
  11. }
  12. ?>
  13. ===DONE===
  14. --EXPECTF--
  15. Warning: foreach() argument must be of type array|object, null given in %s on line %d
  16. ===DONE===