xref: /PHP-7.3/ext/spl/tests/iterator_049b.phpt (revision 782352c5)
1--TEST--
2SPL: ArrayIterator with NULL key
3--FILE--
4<?php
5
6$ar = new ArrayIterator(array(
7	NULL=>1,
8	"\0"=>2,
9	"\0\0"=>3,
10	"\0\0\0"=>4,
11	"\0*"=>5,
12	"\0*\0"=>6,
13	));
14@var_dump($ar);
15var_dump($ar->getArrayCopy());
16
17?>
18===DONE===
19<?php exit(0); ?>
20--EXPECTF--
21object(ArrayIterator)#%d (1) {
22  ["storage":"ArrayIterator":private]=>
23  array(6) {
24    [""]=>
25    int(1)
26    ["�"]=>
27    int(2)
28    ["��"]=>
29    int(3)
30    ["���"]=>
31    int(4)
32    ["�*"]=>
33    int(5)
34    ["�*�"]=>
35    int(6)
36  }
37}
38array(6) {
39  [""]=>
40  int(1)
41  ["�"]=>
42  int(2)
43  ["��"]=>
44  int(3)
45  ["���"]=>
46  int(4)
47  ["�*"]=>
48  int(5)
49  ["�*�"]=>
50  int(6)
51}
52===DONE===
53