php-src/tests/lang/bug7515.phpt
2020-02-03 22:52:20 +01:00

34 lines
411 B
PHP

--TEST--
Bug #7515 (weird & invisible referencing of objects)
--FILE--
<?php
class obj {
function method() {}
}
$o = new stdClass;
$o->root = new obj();
ob_start();
var_dump($o);
$x=ob_get_contents();
ob_end_clean();
$o->root->method();
ob_start();
var_dump($o);
$y=ob_get_contents();
ob_end_clean();
if ($x == $y) {
print "success";
} else {
print "failure
x=$x
y=$y
";
}
?>
--EXPECT--
success