1--TEST--
2Check key execution order with &new.
3--FILE--
4<?php
5$a[2][3] = 'stdClass';
6$a[$i=0][++$i] =& new $a[++$i][++$i];
7print_r($a);
8
9$o = new stdClass;
10$o->a =& new $a[$i=2][++$i];
11$o->a->b =& new $a[$i=2][++$i];
12print_r($o);
13?>
14--EXPECTF--
15Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 3
16
17Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 7
18
19Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 8
20Array
21(
22    [2] => Array
23        (
24            [3] => stdClass
25        )
26
27    [0] => Array
28        (
29            [1] => stdClass Object
30                (
31                )
32
33        )
34
35)
36stdClass Object
37(
38    [a] => stdClass Object
39        (
40            [b] => stdClass Object
41                (
42                )
43
44        )
45
46)
47