1--TEST-- 2Weakrefs debug dump 3--FILE-- 4<?php 5 6$s = new stdClass; 7$s->hello = 'world'; 8 9$weak = WeakReference::create($s); 10var_dump($weak); 11unset($s); 12var_dump($weak); 13 14?> 15--EXPECT-- 16object(WeakReference)#2 (1) { 17 ["object"]=> 18 object(stdClass)#1 (1) { 19 ["hello"]=> 20 string(5) "world" 21 } 22} 23object(WeakReference)#2 (1) { 24 ["object"]=> 25 NULL 26} 27