diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2017-10-17 13:45:46 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2017-10-17 13:45:46 +0300 |
| commit | 801b467c73c5435c83d122549626ae1979b96414 (patch) | |
| tree | 08cadbcb3327a74c34ee7e9ef36c5d9f777e0a22 | |
| parent | d0f4dbfd9613cbd07e94511b374bd292a3bfd56c (diff) | |
| download | php-git-801b467c73c5435c83d122549626ae1979b96414.tar.gz | |
Added test
| -rw-r--r-- | Zend/tests/gc_036.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/gc_036.phpt b/Zend/tests/gc_036.phpt new file mode 100644 index 0000000000..67f9a45465 --- /dev/null +++ b/Zend/tests/gc_036.phpt @@ -0,0 +1,19 @@ +--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 |
