mirror of
https://github.com/php/php-src.git
synced 2026-04-26 17:38:14 +02:00
1762a87932
When we detach an iterator, we also have to delete it. Closes GH-8374.
10 lines
177 B
PHP
10 lines
177 B
PHP
--TEST--
|
|
Bug GH-8366 (ArrayIterator may leak when calling __construct())
|
|
--FILE--
|
|
<?php
|
|
$it = new \ArrayIterator();
|
|
foreach ($it as $elt) {}
|
|
$it->__construct([]);
|
|
?>
|
|
--EXPECT--
|