xref: /PHP-8.0/ext/spl/tests/iterator_049b.phpt (revision f8d79582)
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--EXPECTF--
19object(ArrayIterator)#%d (1) {
20  ["storage":"ArrayIterator":private]=>
21  array(6) {
22    [""]=>
23    int(1)
24    ["�"]=>
25    int(2)
26    ["��"]=>
27    int(3)
28    ["���"]=>
29    int(4)
30    ["�*"]=>
31    int(5)
32    ["�*�"]=>
33    int(6)
34  }
35}
36array(6) {
37  [""]=>
38  int(1)
39  ["�"]=>
40  int(2)
41  ["��"]=>
42  int(3)
43  ["���"]=>
44  int(4)
45  ["�*"]=>
46  int(5)
47  ["�*�"]=>
48  int(6)
49}
50