com php-src: Added test: Zend/tests/gc_035.phpt

From: Date: Fri, 17 Apr 2015 15:45:46 +0000
Subject: com php-src: Added test: Zend/tests/gc_035.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86354@lists.php.net to get a copy of this message
Commit: 736b7cf4191fab9bd7cb0c5252f6e984da53340d Author: Dmitry Stogov <dmitry@zend.com> Fri, 17 Apr 2015 18:45:46 +0300 Parents: 3e203ecea5fb4a79a947a497e785515cb8b3d54a Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=736b7cf4191fab9bd7cb0c5252f6e984da53340d Log: Added test Changed paths: A Zend/tests/gc_035.phpt Diff: diff --git a/Zend/tests/gc_035.phpt b/Zend/tests/gc_035.phpt new file mode 100644 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)

« previous php.cvs (#86354) next »