1--TEST-- 2Bug #63734 (Garbage collector can free zvals that are still referenced) 3--FILE-- 4<?php 5class C { 6 public $ref; 7 public $ary; 8 public function __construct() { 9 $this->ref = $this; 10 $this->ary[] = 42; 11 } 12 public function __destruct() { 13 global $ary; 14 $ary[] = $this->ary[0]; 15 } 16} 17 18$c = new C; 19unset($c); 20gc_collect_cycles(); 21 22var_dump($ary); 23?> 24--EXPECT-- 25array(1) { 26 [0]=> 27 int(42) 28} 29