php-src/Zend/tests/gc_036.phpt
Dmitry Stogov 801b467c73 Added test
2017-10-17 13:45:46 +03:00

20 lines
231 B
PHP

--TEST--
GC 036: Memleaks in self-referenced array
--INI--
zend.enable_gc = 1
--FILE--
<?php
function &foo() {
$a = [];
$a[] =& $a;
return $a;
}
function bar() {
gc_collect_cycles();
}
bar(foo());
echo "ok\n";
?>
--EXPECT--
ok