xref: /PHP-7.4/Zend/tests/objects_020.phpt (revision e63febb1)
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--
17Warning: Creating default object from empty value in %sobjects_020.php on line 7
18object(stdClass)#%d (2) {
19  ["a"]=>
20  *RECURSION*
21  ["b"]=>
22  array(1) {
23    [0]=>
24    int(2)
25  }
26}
27