3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '500 - 1112', ' 1113 - 2224', '2225 - 4446 ', '4446' ]; var_export( array_reduce( $array, function ($result, $v) { if (sscanf($v, '%d - %d', $ints[], $ints[]) === 2) { $result[0] ??= []; array_push($result[0], ...$ints); } else { $result[1] = $ints[0]; } return $result; }, [] ) );

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.5.10.0100.01016.82
8.5.00.0120.00819.82
8.4.150.0030.00014.05
8.4.140.0140.00717.90
8.4.130.0120.00617.89
8.4.120.0100.01220.77
8.4.110.0090.01122.31
8.4.100.0130.00717.57
8.4.90.0130.00919.46
8.4.80.0120.00617.84
8.4.70.0110.00617.95
8.4.60.0170.00418.01
8.4.50.0150.00518.80
8.4.40.0100.01017.65
8.4.30.0030.01319.03
8.4.20.0170.00719.46
8.4.10.0280.01019.10
8.3.280.0090.01218.21
8.3.270.0100.00916.50
8.3.260.0120.00816.55
8.3.250.0050.01318.89
8.3.240.0090.01016.63
8.3.230.0090.01016.64
8.3.220.0110.00817.18
8.3.210.0130.00716.53
8.3.200.0120.00316.61
8.3.190.0120.00616.68
8.3.180.0070.00716.48
8.3.170.0060.01217.13
8.3.160.0110.00718.61
8.3.150.0190.00518.23
8.3.140.0140.00518.64
8.3.130.0200.00416.77
8.3.120.0150.00418.63
8.3.110.0140.00316.68
8.3.100.0080.01216.31
8.3.90.0170.00316.33
8.3.80.0180.00316.52
8.3.70.0180.00316.44
8.3.60.0130.00918.23
8.3.50.0110.01116.16
8.3.40.0130.00417.40
8.3.30.0130.00317.43
8.3.20.0170.00017.47
8.3.10.0180.00019.10
8.3.00.0070.00319.46
8.2.290.0130.00520.39
8.2.280.0030.00520.28
8.2.270.0110.00618.39
8.2.260.0140.00316.71
8.2.250.0160.00316.50
8.2.240.0130.00416.37
8.2.230.0170.00016.34
8.2.220.0150.00416.55
8.2.210.0130.00516.44
8.2.200.0130.00416.77
8.2.190.0160.00316.60
8.2.180.0190.00018.31
8.2.170.0170.00317.63
8.2.160.0120.00817.53
8.2.150.0130.00517.71
8.2.140.0130.00617.42
8.2.130.0180.00017.30
8.2.120.0140.00517.42
8.2.110.0190.00017.65
8.2.100.0180.00317.39
8.2.90.0120.00617.57
8.2.80.0100.00717.47
8.2.70.0120.00617.45
8.2.60.0170.00017.44
8.2.50.0120.00817.55
8.2.40.0170.00017.76
8.2.30.0130.00319.19
8.2.20.0160.00017.40
8.2.10.0190.00419.22
8.2.00.0110.00419.33
8.1.320.0090.00920.23

preferences:
32.85 ms | 403 KiB | 5 Q