xref: /PHP-7.0/Zend/tests/dereference_009.phpt (revision 99c31b31)
1--TEST--
2Testing array dereference with references
3--FILE--
4<?php
5
6error_reporting(E_ALL);
7
8$a = array();
9
10function &a() {
11	return $GLOBALS['a'];
12}
13
14var_dump($h =& a());
15$h[] = 1;
16var_dump(a()[0]);
17
18$h[] = array($h);
19var_dump(a()[1][0][0]);
20
21?>
22--EXPECT--
23array(0) {
24}
25int(1)
26int(1)
27