1--TEST-- 2Test range() function with unexpected string input variations or unusual step. 3--INI-- 4serialize_precision=14 5--FILE-- 6<?php 7 8echo "int compatible float as step\n"; 9var_dump( range("a", "h", 2.0) ); 10 11// What range does is increment the ASCII character code point 12echo "A to z range()\n"; 13var_dump( range("A", "z") ); 14 15echo "Done\n"; 16?> 17--EXPECT-- 18int compatible float as step 19array(4) { 20 [0]=> 21 string(1) "a" 22 [1]=> 23 string(1) "c" 24 [2]=> 25 string(1) "e" 26 [3]=> 27 string(1) "g" 28} 29A to z range() 30array(58) { 31 [0]=> 32 string(1) "A" 33 [1]=> 34 string(1) "B" 35 [2]=> 36 string(1) "C" 37 [3]=> 38 string(1) "D" 39 [4]=> 40 string(1) "E" 41 [5]=> 42 string(1) "F" 43 [6]=> 44 string(1) "G" 45 [7]=> 46 string(1) "H" 47 [8]=> 48 string(1) "I" 49 [9]=> 50 string(1) "J" 51 [10]=> 52 string(1) "K" 53 [11]=> 54 string(1) "L" 55 [12]=> 56 string(1) "M" 57 [13]=> 58 string(1) "N" 59 [14]=> 60 string(1) "O" 61 [15]=> 62 string(1) "P" 63 [16]=> 64 string(1) "Q" 65 [17]=> 66 string(1) "R" 67 [18]=> 68 string(1) "S" 69 [19]=> 70 string(1) "T" 71 [20]=> 72 string(1) "U" 73 [21]=> 74 string(1) "V" 75 [22]=> 76 string(1) "W" 77 [23]=> 78 string(1) "X" 79 [24]=> 80 string(1) "Y" 81 [25]=> 82 string(1) "Z" 83 [26]=> 84 string(1) "[" 85 [27]=> 86 string(1) "\" 87 [28]=> 88 string(1) "]" 89 [29]=> 90 string(1) "^" 91 [30]=> 92 string(1) "_" 93 [31]=> 94 string(1) "`" 95 [32]=> 96 string(1) "a" 97 [33]=> 98 string(1) "b" 99 [34]=> 100 string(1) "c" 101 [35]=> 102 string(1) "d" 103 [36]=> 104 string(1) "e" 105 [37]=> 106 string(1) "f" 107 [38]=> 108 string(1) "g" 109 [39]=> 110 string(1) "h" 111 [40]=> 112 string(1) "i" 113 [41]=> 114 string(1) "j" 115 [42]=> 116 string(1) "k" 117 [43]=> 118 string(1) "l" 119 [44]=> 120 string(1) "m" 121 [45]=> 122 string(1) "n" 123 [46]=> 124 string(1) "o" 125 [47]=> 126 string(1) "p" 127 [48]=> 128 string(1) "q" 129 [49]=> 130 string(1) "r" 131 [50]=> 132 string(1) "s" 133 [51]=> 134 string(1) "t" 135 [52]=> 136 string(1) "u" 137 [53]=> 138 string(1) "v" 139 [54]=> 140 string(1) "w" 141 [55]=> 142 string(1) "x" 143 [56]=> 144 string(1) "y" 145 [57]=> 146 string(1) "z" 147} 148Done 149