diff options
Diffstat (limited to 'Zend/tests/gc_016.phpt')
-rw-r--r-- | Zend/tests/gc_016.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/gc_016.phpt b/Zend/tests/gc_016.phpt new file mode 100644 index 0000000000..6d6a363070 --- /dev/null +++ b/Zend/tests/gc_016.phpt @@ -0,0 +1,24 @@ +--TEST-- +GC 016: nested GC calls +--FILE-- +<?php +class Foo { + public $a; + function __destruct() { + echo "-> "; + $a = array(); + $a[] =& $a; + unset($a); + var_dump(gc_collect_cycles()); + } +} +$a = new Foo(); +$a->a = $a; +unset($a); +var_dump(gc_collect_cycles()); +echo "ok\n" +?> +--EXPECT-- +-> int(1) +int(1) +ok |