Annotation of embedaddon/php/ext/spl/tests/fixedarray_008.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SPL: FixedArray: Assigning the itself object testing the reference
3: --FILE--
4: <?php
5:
6: $b = 3;
7: $a = new SplFixedArray($b);
8:
9: $a[0] = 1;
10: $a[1] = 2;
11: $a[2] = $a;
12:
13: $a[2][0] = 3;
14:
15: foreach ($a as $x) {
16: if (is_object($x)) {
17: var_dump($x[0]);
18: } else {
19: var_dump($x);
20: }
21: }
22:
23: var_dump($a->getSize());
24:
25: ?>
26: --EXPECT--
27: int(3)
28: int(2)
29: int(3)
30: int(3)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>