3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(range([], [])); echo "Range will ignore any byte after the first one\n"; var_dump( range("AA", "BB") ); echo "Range cannot operate on an empty string\n"; var_dump( range("Z", "") ); // Both strings are cast to int, i.e. 0 var_dump( range("", "Z") ); // Both strings are cast to int, i.e. 0 echo "Mixing numeric string and character\n"; var_dump( range("1", "A") ); // The char is cast to an int, i.e. 0 var_dump( range("?", "1") ); // The char is cast to an int, i.e. 0 var_dump( range("3.5", "A") ); // The char is cast to a float, i.e. 0 var_dump( range("?", "3.5") ); // The char is cast to a float, i.e. 0 echo "Fractional step cannot be used on character ranges\n"; var_dump( range("A", "H", 2.6) ); // Because step is fractional it tries to interpret inputs as floats

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0070.00716.38
8.3.50.0140.00716.73
8.3.40.0160.00321.90
8.3.30.0040.01118.90
8.3.20.0070.00024.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.180.0110.01118.21
8.2.170.0150.00419.08
8.2.160.0120.00822.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00419.95
8.2.110.0000.00920.41
8.2.100.0040.00817.91
8.2.90.0050.00318.28
8.2.80.0040.00417.97
8.2.70.0070.00317.92
8.2.60.0000.00817.80
8.2.50.0000.00818.10
8.2.40.0070.00220.18
8.2.30.0140.00317.93
8.2.20.0070.00618.94
8.2.10.0100.00618.11
8.2.00.0090.00818.06
8.1.280.0100.01025.92
8.1.270.0080.00024.66
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0090.00024.00
8.1.230.0070.00421.00
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0050.00317.23
8.1.190.0000.00817.11
8.1.180.0030.00618.10
8.1.170.0140.00317.96
8.1.160.0050.01217.93
8.1.150.0140.00318.78
8.1.140.0180.00018.77
8.1.130.0110.00618.93
8.1.120.0110.00718.00
8.1.110.0130.00417.94
8.1.100.0160.00118.01
8.1.90.0130.00317.98
8.1.80.0150.00217.99
8.1.70.0150.00217.87
8.1.60.0140.00618.07
8.1.50.0120.00718.07
8.1.40.0090.01018.84
8.1.30.0110.00718.86
8.1.20.0120.00619.05
8.1.10.0170.00218.14
8.1.00.0120.00617.99
8.0.300.0060.00320.07
8.0.290.0080.00016.63
8.0.280.0050.01217.61
8.0.270.0140.00318.63
8.0.260.0130.00417.60
8.0.250.0130.00417.60
8.0.240.0140.00317.61
8.0.230.0140.00318.52
8.0.220.0120.00517.69
8.0.210.0100.00717.60
8.0.200.0150.00217.60
8.0.190.0130.00417.65
8.0.180.0160.00217.76
8.0.170.0150.00117.75
8.0.160.0110.00617.63
8.0.150.0110.00717.60
8.0.140.0160.00017.63
8.0.130.0130.00417.60
8.0.120.0110.00517.60
8.0.110.0150.00218.48
8.0.100.0120.00517.60
8.0.90.0110.00617.60
8.0.80.0130.00417.60
8.0.70.0080.00817.61
8.0.60.0120.00717.72
8.0.50.0130.00417.62
8.0.30.0120.00617.60
8.0.20.0140.00217.60
8.0.10.0100.00617.68

preferences:
44.54 ms | 401 KiB | 5 Q