mirror of
https://github.com/php/php-src.git
synced 2024-12-18 22:41:20 +08:00
36 lines
484 B
PHP
36 lines
484 B
PHP
--TEST--
|
|
Bug #7515 (weird & invisible referencing of objects)
|
|
--INI--
|
|
error_reporting=2039
|
|
--FILE--
|
|
<?php
|
|
class obj {
|
|
function method() {}
|
|
}
|
|
|
|
$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
|
|
";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Creating default object from empty value in %s on line %d
|
|
success
|