1--TEST--
2Using different sorts of numerical strings as an array offset
3--FILE--
4<?php
5
6$arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
7
8var_dump($arr["7"]);
9var_dump($arr["7.5"]);
10var_dump($arr["  7"]);
11var_dump($arr["  7.5"]);
12var_dump($arr["  7  "]);
13var_dump($arr["  7.5  "]);
14var_dump($arr["7  "]);
15var_dump($arr["7.5  "]);
16var_dump($arr["7str"]);
17var_dump($arr["7.5str"]);
18var_dump($arr["  7str"]);
19var_dump($arr["  7.5str"]);
20var_dump($arr["  7  str"]);
21var_dump($arr["  7.5  str"]);
22var_dump($arr["7  str"]);
23var_dump($arr["7.5  str"]);
24var_dump($arr["0xA"]);
25var_dump($arr["0b10"]);
26var_dump($arr["07"]);
27
28echo "Done\n";
29?>
30--EXPECTF--
31int(7)
32
33Warning: Undefined array key "7.5" in %s on line %d
34NULL
35
36Warning: Undefined array key "  7" in %s on line %d
37NULL
38
39Warning: Undefined array key "  7.5" in %s on line %d
40NULL
41
42Warning: Undefined array key "  7  " in %s on line %d
43NULL
44
45Warning: Undefined array key "  7.5  " in %s on line %d
46NULL
47
48Warning: Undefined array key "7  " in %s on line %d
49NULL
50
51Warning: Undefined array key "7.5  " in %s on line %d
52NULL
53
54Warning: Undefined array key "7str" in %s on line %d
55NULL
56
57Warning: Undefined array key "7.5str" in %s on line %d
58NULL
59
60Warning: Undefined array key "  7str" in %s on line %d
61NULL
62
63Warning: Undefined array key "  7.5str" in %s on line %d
64NULL
65
66Warning: Undefined array key "  7  str" in %s on line %d
67NULL
68
69Warning: Undefined array key "  7.5  str" in %s on line %d
70NULL
71
72Warning: Undefined array key "7  str" in %s on line %d
73NULL
74
75Warning: Undefined array key "7.5  str" in %s on line %d
76NULL
77
78Warning: Undefined array key "0xA" in %s on line %d
79NULL
80
81Warning: Undefined array key "0b10" in %s on line %d
82NULL
83
84Warning: Undefined array key "07" in %s on line %d
85NULL
86Done
87