1--TEST-- 2WeakReference 3--FILE-- 4<?php 5$std = new stdClass; 6 7debug_zval_dump($std); 8 9$wr = WeakReference::create($std); 10$wr2 = WeakReference::create($std); 11 12debug_zval_dump($std); 13 14var_dump($wr, $wr2); 15 16debug_zval_dump($wr->get()); 17debug_zval_dump($wr2->get()); 18 19unset($std); 20 21debug_zval_dump($wr->get()); 22debug_zval_dump($wr2->get()); 23?> 24--EXPECT-- 25object(stdClass)#1 (0) refcount(2){ 26} 27object(stdClass)#1 (0) refcount(2){ 28} 29object(WeakReference)#2 (0) { 30} 31object(WeakReference)#2 (0) { 32} 33object(stdClass)#1 (0) refcount(2){ 34} 35object(stdClass)#1 (0) refcount(2){ 36} 37NULL 38NULL 39 40