mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
ecf368b8f2
* PHP-7.4: Fixed bug #79792
17 lines
335 B
PHP
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===
|