1--TEST-- 2Bug #7515 (weird & invisible referencing of objects) 3--INI-- 4error_reporting=2039 5--FILE-- 6<?php 7class obj { 8 function method() {} 9} 10 11$o->root=new obj(); 12 13ob_start(); 14var_dump($o); 15$x=ob_get_contents(); 16ob_end_clean(); 17 18$o->root->method(); 19 20ob_start(); 21var_dump($o); 22$y=ob_get_contents(); 23ob_end_clean(); 24if ($x == $y) { 25 print "success"; 26} else { 27 print "failure 28x=$x 29y=$y 30"; 31} 32?> 33--EXPECTF-- 34Warning: Creating default object from empty value in %s on line %d 35success 36