projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e203ec
)
Added test
author
Dmitry Stogov
<dmitry@zend.com>
Fri, 17 Apr 2015 15:45:46 +0000
(18:45 +0300)
committer
Dmitry Stogov
<dmitry@zend.com>
Fri, 17 Apr 2015 15:45:46 +0000
(18:45 +0300)
Zend/tests/gc_035.phpt
[new file with mode: 0644]
patch
|
blob
diff --git a/Zend/tests/gc_035.phpt
b/Zend/tests/gc_035.phpt
new file mode 100644
(file)
index 0000000..
985264c
--- /dev/null
+++ b/
Zend/tests/gc_035.phpt
@@ -0,0
+1,24
@@
+--TEST--
+GC 035: Lost inner-cycles garbage
+--FILE--
+<?php
+class A {
+ public $a;
+ public $x;
+ function __destruct() {
+ unset($this->x);
+ }
+}
+$a = new A;
+$a->a = $a;
+$a->x = [];
+$a->x[] =& $a->x;
+$a->x[] = $a;
+var_dump(gc_collect_cycles());
+unset($a);
+var_dump(gc_collect_cycles());
+var_dump(gc_collect_cycles());
+--EXPECT--
+int(0)
+int(2)
+int(0)