|
47 | 47 | echo $e->getMessage(), "\n";
|
48 | 48 | }
|
49 | 49 |
|
| 50 | +echo "\n\n-- Testing ( (low < high) && (high-low < step) ) for characters --\n"; |
| 51 | +try { |
| 52 | + var_dump(range('a', 'z', 100)); |
| 53 | +} catch (\ValueError $e) { |
| 54 | + echo $e->getMessage(), "\n"; |
| 55 | +} |
| 56 | + |
| 57 | +echo "\n\n-- Testing ( (low > high) && (low-high < step) ) for characters --\n"; |
| 58 | +try { |
| 59 | + var_dump(range('z', 'a', 100)); |
| 60 | +} catch (\ValueError $e) { |
| 61 | + echo $e->getMessage(), "\n"; |
| 62 | +} |
| 63 | + |
50 | 64 | echo "\n-- Testing other conditions --\n";
|
51 | 65 | try {
|
52 | 66 | var_dump( range(-1, -2, 2) );
|
@@ -97,6 +111,14 @@ range(): Argument #3 ($step) must not exceed the specified range
|
97 | 111 | -- Testing ( (low > high) && (low-high < step) ) --
|
98 | 112 | range(): Argument #3 ($step) must not exceed the specified range
|
99 | 113 |
|
| 114 | + |
| 115 | +-- Testing ( (low < high) && (high-low < step) ) for characters -- |
| 116 | +range(): Argument #3 ($step) must not exceed the specified range |
| 117 | + |
| 118 | + |
| 119 | +-- Testing ( (low > high) && (low-high < step) ) for characters -- |
| 120 | +range(): Argument #3 ($step) must not exceed the specified range |
| 121 | + |
100 | 122 | -- Testing other conditions --
|
101 | 123 | range(): Argument #3 ($step) must not exceed the specified range
|
102 | 124 | range(): Argument #3 ($step) must be of type int|float, string given
|
|
0 commit comments