xref: /PHP-5.4/Zend/tests/objects_020.phpt (revision fa762634)
1--TEST--
2Accessing members of standard object through of variable variable
3--FILE--
4<?php
5
6error_reporting(E_ALL);
7
8$test = 'stdclass';
9
10$$test->a =& $$test;
11$$test->a->b[] = 2;
12
13var_dump($$test);
14
15?>
16--EXPECTF--
17object(stdClass)#%d (2) {
18  ["a"]=>
19  *RECURSION*
20  ["b"]=>
21  array(1) {
22    [0]=>
23    int(2)
24  }
25}
26