3v4l.org

run code in 300+ PHP versions simultaneously
<?php function range_string_to_array($range_string) { $range_string = trim($range_string); $return_array = array(); $return = array(); $range_string = str_replace(',', '+', $range_string); $range_string = str_replace(' ', '+', $range_string); if (is_numeric($range_string)) { return array($range_string); } $split_array = explode('+', $range_string); foreach ($split_array as $split1) { if ($split1 === '') { continue; } if (strpos($split1, '-') > -1) { $split = explode('-', $split1); if ($split[0] === '' && $split[1] === '') { continue; } if (floor($split[1]) != $split[1]) { $return_array[] = $split[1]; $return_array[] = floor($split[1]) + 1; } $return_array[] = $split[0]; foreach (range(floor($split[0]) + 1, $split[1], 1) as $split2) { $return_array[] = $split2; } } else { $return_array[] = $split1; } } foreach ($return_array as $return_array_val) { if (is_numeric($return_array_val)) { $return[] = $return_array_val; } } $return = array_unique($return); sort($return); return $return; } print_r(range_string_to_array('155.5-155.6'));

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.0090.00618.48
8.3.50.0130.01022.17
8.3.40.0120.00319.01
8.3.30.0090.00919.39
8.3.20.0080.00020.47
8.3.10.0040.00423.82
8.3.00.0090.00019.18
8.2.180.0150.00416.63
8.2.170.0100.00322.96
8.2.160.0070.01022.26
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0100.00626.16
8.2.120.0050.00321.20
8.2.110.0080.00020.55
8.2.100.0060.00617.91
8.2.90.0080.00418.00
8.2.80.0050.00318.90
8.2.70.0080.00018.15
8.2.60.0040.00418.16
8.2.50.0040.00418.10
8.2.40.0050.00519.64
8.2.30.0040.00419.33
8.2.20.0000.00717.82
8.2.10.0070.00018.27
8.2.00.0000.00817.78
8.1.280.0110.01125.92
8.1.270.0060.00318.97
8.1.260.0070.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00324.02
8.1.230.0090.00321.02
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0040.00417.48
8.1.190.0040.00417.36
8.1.180.0030.00519.06
8.1.170.0000.00918.59
8.1.160.0040.00419.02
8.1.150.0040.00418.99
8.1.140.0040.00417.55
8.1.130.0040.00417.98
8.1.120.0070.00017.48
8.1.110.0080.00417.57
8.1.100.0070.00017.42
8.1.90.0040.00317.53
8.1.80.0000.00717.39
8.1.70.0030.00317.54
8.1.60.0040.00417.65
8.1.50.0040.00417.57
8.1.40.0040.00417.54
8.1.30.0030.00517.76
8.1.20.0000.00717.67
8.1.10.0000.00717.69
8.1.00.0050.00317.59
8.0.300.0090.00018.77
8.0.290.0000.00816.88
8.0.280.0000.00818.44
8.0.270.0070.00017.30
8.0.260.0030.00317.30
8.0.250.0000.00717.09
8.0.240.0040.00417.14
8.0.230.0000.00717.11
8.0.220.0070.00016.94
8.0.210.0000.00817.11
8.0.200.0090.00017.00
8.0.190.0000.00817.07
8.0.180.0060.00317.11
8.0.170.0000.00716.93
8.0.160.0000.00717.09
8.0.150.0000.00716.96
8.0.140.0030.00316.91
8.0.130.0000.00713.47
8.0.120.0040.00417.01
8.0.110.0030.00616.96
8.0.100.0000.00816.91
8.0.90.0040.00416.97
8.0.80.0150.00317.02
8.0.70.0000.00816.97
8.0.60.0040.00416.94
8.0.50.0050.00216.88
8.0.30.0120.01117.19
8.0.20.0150.01217.40
8.0.10.0080.00016.96
8.0.00.0120.00816.75
7.4.330.0050.00015.06
7.4.320.0000.00716.74
7.4.300.0000.00616.54
7.4.290.0040.00416.60
7.4.280.0040.00416.68
7.4.270.0030.00516.64
7.4.260.0070.00316.64
7.4.250.0000.00716.52
7.4.240.0010.00616.64
7.4.230.0030.00316.66
7.4.220.0060.01216.54
7.4.210.0100.01016.80
7.4.200.0070.00016.44
7.4.160.0090.00616.71
7.4.150.0130.01317.40
7.4.140.0090.01017.86
7.4.130.0090.01316.54
7.4.120.0130.00516.69
7.4.110.0070.01416.74
7.4.100.0030.01516.74
7.4.90.0030.01316.62
7.4.80.0100.00719.39
7.4.70.0060.01116.51
7.4.60.0030.01416.70
7.4.50.0000.00816.49
7.4.40.0060.01016.84
7.4.30.0060.01016.63
7.4.00.0090.00914.78
7.3.330.0000.00513.34
7.3.320.0030.00313.49
7.3.310.0000.00716.43
7.3.300.0000.00716.38
7.3.290.0080.00916.50
7.3.280.0070.00916.50
7.3.270.0140.00717.40
7.3.260.0030.01416.84
7.3.250.0090.00816.61
7.3.240.0140.01016.68
7.3.230.0160.00016.55
7.3.210.0090.00916.64
7.3.200.0100.00719.39
7.3.190.0160.00016.59
7.3.180.0050.01116.60
7.3.170.0080.00816.64
7.3.160.0060.01016.52
7.2.330.0140.00316.84
7.2.320.0080.00816.96
7.2.310.0070.01016.42
7.2.300.0140.00716.91
7.2.290.0100.00716.92
7.2.80.0070.00716.85
7.2.60.0130.00317.06
7.1.200.0070.00715.88
7.1.100.0810.01616.06
7.1.70.0000.00716.78
7.1.60.0160.00619.22
7.1.50.0000.02216.98
7.1.00.0070.07322.31
7.0.200.0070.00316.82
7.0.140.0000.06721.99
7.0.60.0030.07019.90
7.0.50.0100.07717.86
7.0.40.0030.09020.15
7.0.30.0570.06320.25
7.0.20.0230.08020.15
7.0.10.0070.07720.07
7.0.00.0070.06020.20
5.6.280.0030.07720.92
5.6.210.0130.06720.78
5.6.200.0070.07718.29
5.6.190.0070.08720.55
5.6.180.3370.04020.48
5.6.170.0230.07320.50
5.6.160.0100.04720.55
5.6.150.0030.05718.27
5.6.140.0070.08018.28
5.6.130.0030.04018.15
5.6.120.0100.04020.98
5.6.110.0130.03320.90
5.6.100.0030.08321.00
5.6.90.0100.05721.02
5.6.80.0100.05320.39
5.6.70.0400.06720.34
5.5.350.0000.08720.42
5.5.340.0070.08018.09
5.5.330.0030.05020.21
5.5.320.0370.05320.35
5.5.310.0230.07320.20
5.5.300.0030.04018.10
5.5.290.0000.08717.94
5.5.280.0200.07320.89
5.5.270.0130.05020.66
5.5.260.0070.04320.70
5.5.250.0230.06020.68
5.5.240.0000.04020.30
5.4.450.0530.05719.56
5.4.440.0900.06719.40
5.4.430.0830.06019.21
5.4.420.0800.05319.52
5.4.410.0100.05019.26
5.4.400.0900.04319.16
5.4.390.0200.05718.72
5.4.380.0300.07018.54
5.4.370.0230.05318.57
5.4.360.0200.06018.72
5.4.350.0400.05018.63
5.4.340.0270.05718.80
5.4.320.0370.04718.53
5.4.310.0200.05718.84
5.4.300.0200.07318.77
5.4.290.0270.05718.74
5.4.280.0330.06018.71
5.4.270.0430.06718.50
5.4.260.0400.05318.70
5.4.250.0100.08018.83
5.4.240.0300.06018.53
5.4.230.0170.05718.73
5.4.220.0170.06018.73
5.4.210.0130.06018.81
5.4.200.0330.06716.67
5.4.190.0330.05718.70
5.4.180.0230.05718.70
5.4.170.0200.06318.55
5.4.160.0230.05018.51
5.4.150.0230.06718.56
5.4.140.0200.06016.27
5.4.130.0200.06316.18
5.4.120.0130.07316.47
5.4.110.0200.05016.19
5.4.100.0200.05316.33
5.4.90.0130.07716.21
5.4.80.0170.05016.16
5.4.70.0200.06016.28
5.4.60.0230.04716.29
5.4.50.0170.05016.29
5.4.40.0170.05316.40
5.4.30.0330.04716.17
5.4.20.0130.07716.13
5.4.10.0230.07016.40
5.4.00.0230.05315.76
5.3.290.0170.05714.66
5.3.280.0130.05714.59
5.3.270.0300.04314.84
5.3.260.0170.05714.66
5.3.250.0170.05014.66
5.3.240.0130.06014.67
5.3.230.0200.05014.78
5.3.220.0100.06014.60
5.3.210.0230.06014.76
5.3.200.0270.06014.57
5.3.190.0130.07014.71
5.3.180.0130.06014.60
5.3.170.0130.05314.60
5.3.160.0300.03714.74
5.3.150.0200.04714.70
5.3.140.0100.05714.61
5.3.130.0170.05014.62
5.3.120.0170.06314.70
5.3.110.0200.05314.74
5.3.100.0200.04714.19
5.3.90.0270.04714.28
5.3.80.0170.05314.05
5.3.70.0200.04714.07
5.3.60.0230.05314.14
5.3.50.0270.04314.02
5.3.40.0270.04713.99
5.3.30.0230.04314.03
5.3.20.0200.05013.71
5.3.10.0170.05713.67
5.3.00.0200.05713.73
5.2.170.0070.05011.20
5.2.160.0030.06011.21
5.2.150.0070.05011.27
5.2.140.0130.04711.40
5.2.130.0170.03711.23
5.2.120.0170.03711.14
5.2.110.0170.04011.22
5.2.100.0100.04311.14
5.2.90.0230.03311.11
5.2.80.0100.04311.22
5.2.70.0170.04011.23
5.2.60.0100.04311.09
5.2.50.0170.04011.09
5.2.40.0170.03711.03
5.2.30.0170.04711.21
5.2.20.0170.04010.95
5.2.10.0100.05310.98
5.2.00.0100.05710.96
5.1.60.0070.03710.22
5.1.50.0100.04710.09
5.1.40.0130.03310.04
5.1.30.0030.04310.40
5.1.20.0070.04010.50
5.1.10.0170.03010.11
5.1.00.0100.04310.27
5.0.50.0170.0308.76
5.0.40.0100.0278.49
5.0.30.0100.0408.45
5.0.20.0070.0278.22
5.0.10.0070.0308.21
5.0.00.0070.0438.27
4.4.90.0030.0235.93
4.4.80.0130.0275.95
4.4.70.0030.0235.91
4.4.60.0030.0235.91
4.4.50.0130.0275.95
4.4.40.0100.0435.99
4.4.30.0070.0305.90
4.4.20.0070.0306.07
4.4.10.0030.0236.01
4.4.00.0030.0406.09
4.3.110.0100.0275.98
4.3.100.0100.0275.88
4.3.90.0070.0205.82
4.3.80.0070.0405.85
4.3.70.0100.0275.82
4.3.60.0130.0175.82
4.3.50.0070.0205.82
4.3.40.0070.0335.82
4.3.30.0030.0234.78
4.3.20.0030.0234.78
4.3.10.0030.0234.78
4.3.00.0100.0237.23

preferences:
49.49 ms | 401 KiB | 5 Q