From: Xinchen Hui Date: Thu, 3 May 2012 11:56:49 +0000 (+0800) Subject: Fixed test bug #61892 X-Git-Tag: php-5.4.4RC1~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d74d88fbb9c29b1dd5ff05a54b72cf7c9250955c;p=php Fixed test bug #61892 --- diff --git a/Zend/tests/gc_029.phpt b/Zend/tests/gc_029.phpt index 438053414a..edd231760c 100644 --- a/Zend/tests/gc_029.phpt +++ b/Zend/tests/gc_029.phpt @@ -1,5 +1,7 @@ --TEST-- GC 029: GC and destructors +--SKIPIF-- +bar !== null) { + $this->x = null; + unset($this->bar); + } + } +} +class Bar { + public $foo; + function __destruct() { + if ($this->foo !== null) { + unset($this->foo); + } + } + +} +$foo = new Foo(); +$bar = new Bar(); +$foo->bar = $bar; +$bar->foo = $foo; +unset($foo); +unset($bar); +var_dump(gc_collect_cycles()); +?> +--EXPECT-- +int(3)