1--TEST-- 2Test range() function with null as argument. 3--INI-- 4serialize_precision=14 5--FILE-- 6<?php 7echo "range(null, null)\n"; 8var_dump( range(null, null) ); 9 10echo "null with int boundary\n"; 11var_dump( range(null, 5) ); 12var_dump( range(5, null) ); 13 14echo "null with float boundary\n"; 15var_dump( range(null, 4.5) ); 16var_dump( range(4.5, null) ); 17 18echo "null with string boundary\n"; 19var_dump( range(null, 'e') ); 20var_dump( range('e', null) ); 21 22echo "Done\n"; 23?> 24--EXPECTF-- 25range(null, null) 26 27Deprecated: range(): Passing null to parameter #1 ($start) of type string|int|float is deprecated in %s on line %d 28 29Deprecated: range(): Passing null to parameter #2 ($end) of type string|int|float is deprecated in %s on line %d 30array(1) { 31 [0]=> 32 int(0) 33} 34null with int boundary 35 36Deprecated: range(): Passing null to parameter #1 ($start) of type string|int|float is deprecated in %s on line %d 37array(6) { 38 [0]=> 39 int(0) 40 [1]=> 41 int(1) 42 [2]=> 43 int(2) 44 [3]=> 45 int(3) 46 [4]=> 47 int(4) 48 [5]=> 49 int(5) 50} 51 52Deprecated: range(): Passing null to parameter #2 ($end) of type string|int|float is deprecated in %s on line %d 53array(6) { 54 [0]=> 55 int(5) 56 [1]=> 57 int(4) 58 [2]=> 59 int(3) 60 [3]=> 61 int(2) 62 [4]=> 63 int(1) 64 [5]=> 65 int(0) 66} 67null with float boundary 68 69Deprecated: range(): Passing null to parameter #1 ($start) of type string|int|float is deprecated in %s on line %d 70array(5) { 71 [0]=> 72 float(0) 73 [1]=> 74 float(1) 75 [2]=> 76 float(2) 77 [3]=> 78 float(3) 79 [4]=> 80 float(4) 81} 82 83Deprecated: range(): Passing null to parameter #2 ($end) of type string|int|float is deprecated in %s on line %d 84array(5) { 85 [0]=> 86 float(4.5) 87 [1]=> 88 float(3.5) 89 [2]=> 90 float(2.5) 91 [3]=> 92 float(1.5) 93 [4]=> 94 float(0.5) 95} 96null with string boundary 97 98Deprecated: range(): Passing null to parameter #1 ($start) of type string|int|float is deprecated in %s on line %d 99 100Warning: range(): Argument #1 ($start) must be a single byte string if argument #2 ($end) is a single byte string, argument #2 ($end) converted to 0 in %s on line %d 101array(1) { 102 [0]=> 103 int(0) 104} 105 106Deprecated: range(): Passing null to parameter #2 ($end) of type string|int|float is deprecated in %s on line %d 107 108Warning: range(): Argument #2 ($end) must be a single byte string if argument #1 ($start) is a single byte string, argument #1 ($start) converted to 0 in %s on line %d 109array(1) { 110 [0]=> 111 int(0) 112} 113Done 114