Annotation of embedaddon/php/Zend/tests/dereference_006.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Testing array dereference and references
3: --FILE--
4: <?php
5:
6: error_reporting(E_ALL);
7:
8: function &foo(&$foo) {
9: return $foo;
10: }
11:
12: $a = array(1);
13: foo($a)[0] = 2;
14: var_dump($a);
15:
16: foo($a)[] = 3;
17: var_dump($a);
18:
19: ?>
20: --EXPECT--
21: array(1) {
22: [0]=>
23: int(2)
24: }
25: array(2) {
26: [0]=>
27: int(2)
28: [1]=>
29: int(3)
30: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>