php-src/Zend/tests/objects_020.phpt

26 lines
313 B
Plaintext
Raw Normal View History

2008-03-12 13:31:38 +00:00
--TEST--
Accessing members of standard object through of variable variable
--FILE--
<?php
error_reporting(E_ALL);
$test = 'stdclass';
$$test->a =& $$test;
$$test->a->b[] = 2;
var_dump($$test);
?>
--EXPECTF--
object(stdClass)#%d (2) {
2008-03-12 13:31:38 +00:00
["a"]=>
*RECURSION*
2008-03-12 13:31:38 +00:00
["b"]=>
array(1) {
[0]=>
int(2)
}
}