xref: /PHP-7.0/ext/standard/tests/array/bug24220.phpt (revision abe8647e)
1--TEST--n
2Bug #24220 (range() numeric string handling)
3--FILE--
4<?php
5	var_dump(range("2003", "2004"));
6	var_dump(range("a", "z"));
7	var_dump(range("1", "10"));
8?>
9--EXPECT--
10array(2) {
11  [0]=>
12  int(2003)
13  [1]=>
14  int(2004)
15}
16array(26) {
17  [0]=>
18  string(1) "a"
19  [1]=>
20  string(1) "b"
21  [2]=>
22  string(1) "c"
23  [3]=>
24  string(1) "d"
25  [4]=>
26  string(1) "e"
27  [5]=>
28  string(1) "f"
29  [6]=>
30  string(1) "g"
31  [7]=>
32  string(1) "h"
33  [8]=>
34  string(1) "i"
35  [9]=>
36  string(1) "j"
37  [10]=>
38  string(1) "k"
39  [11]=>
40  string(1) "l"
41  [12]=>
42  string(1) "m"
43  [13]=>
44  string(1) "n"
45  [14]=>
46  string(1) "o"
47  [15]=>
48  string(1) "p"
49  [16]=>
50  string(1) "q"
51  [17]=>
52  string(1) "r"
53  [18]=>
54  string(1) "s"
55  [19]=>
56  string(1) "t"
57  [20]=>
58  string(1) "u"
59  [21]=>
60  string(1) "v"
61  [22]=>
62  string(1) "w"
63  [23]=>
64  string(1) "x"
65  [24]=>
66  string(1) "y"
67  [25]=>
68  string(1) "z"
69}
70array(10) {
71  [0]=>
72  int(1)
73  [1]=>
74  int(2)
75  [2]=>
76  int(3)
77  [3]=>
78  int(4)
79  [4]=>
80  int(5)
81  [5]=>
82  int(6)
83  [6]=>
84  int(7)
85  [7]=>
86  int(8)
87  [8]=>
88  int(9)
89  [9]=>
90  int(10)
91}
92