php-src/Zend/tests/bug79792.phpt
Nikita Popov ecf368b8f2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79792
2020-07-07 12:00:34 +02:00

17 lines
335 B
PHP

--TEST--
Bug #79792: HT iterators not removed if empty array is destroyed
--FILE--
<?php
$a = [42];
foreach ($a as &$c) {
// Make the array empty.
unset($a[0]);
// Destroy the array.
$a = null;
}
?>
===DONE===
--EXPECTF--
Warning: foreach() argument must be of type array|object, null given in %s on line %d
===DONE===