3v4l.org

run code in 300+ PHP versions simultaneously
<?php const UNIT_FACTOR = [ 'B' => 1, 'KB' => 1024, 'MB' => 1048576, 'GB' => 1073741824, ]; $array = [ 0 => "100 MB", 4 => "10 MB", 8 => "1GB", 12 => "20 MB", 16 => "250 MB", 20 => "2GB", 24 => "4 MB", 28 => "500 MB", 32 => "50 MB", 36 => "5GB", 40 => "8GB", 44 => "0 MB" ]; $bytes = []; foreach ($array as $string) { sscanf($string, '%f%s', $amount, $unit); $bytes[$string] = $amount * UNIT_FACTOR[$unit]; } uasort($array, fn($a, $b) => $bytes[$a] <=> $bytes[$b]); var_export($array);

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.4.140.0100.01117.74
8.4.130.0080.01218.87
8.4.120.0110.00823.93
8.4.110.0100.01018.65
8.4.100.0040.00518.75
8.4.90.0130.01020.61
8.4.80.0120.00818.90
8.4.70.0120.00818.92
8.4.60.0130.00718.99
8.4.50.0060.00418.02
8.4.40.0100.01022.39
8.4.30.0040.01218.38
8.4.20.0170.00317.62
8.4.10.0130.00322.26
8.3.270.0110.00816.47
8.3.260.0130.00716.38
8.3.250.0110.00819.08
8.3.240.0100.00917.01
8.3.230.0110.00816.45
8.3.220.0070.00119.13
8.3.210.0050.00316.61
8.3.200.0030.00616.70
8.3.190.0080.01018.45
8.3.180.0070.01116.57
8.3.170.0100.01016.48
8.3.160.0150.00416.57
8.3.150.0090.00917.16
8.3.140.0100.00716.54
8.3.130.0080.00818.38
8.3.120.0090.00018.75
8.3.110.0110.00416.63
8.3.100.0050.00324.06
8.3.90.0040.00426.77
8.3.80.0060.00316.63
8.3.70.0140.00318.18
8.3.60.0070.00716.75
8.3.50.0120.00319.88
8.3.40.0180.00418.70
8.3.30.0070.00721.05
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0040.00620.30
8.2.280.0050.00321.96
8.2.270.0090.00916.89
8.2.260.0140.00420.64
8.2.250.0080.00016.43
8.2.240.0000.00918.69
8.2.230.0090.00020.94
8.2.220.0030.00637.54
8.2.210.0050.00326.77
8.2.200.0080.00016.50
8.2.190.0120.00316.63
8.2.180.0140.00425.92
8.2.170.0080.00818.89
8.2.160.0100.00722.96
8.2.150.0080.00025.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0000.01022.08
8.2.100.0040.00817.97
8.2.90.0000.00818.03
8.2.80.0000.00819.11
8.2.70.0000.00817.47
8.2.60.0080.00017.75
8.2.50.0000.00817.98
8.2.40.0040.00419.68
8.2.30.0000.00718.00
8.2.20.0000.00720.50
8.2.10.0000.00718.07
8.2.00.0030.00719.25
8.1.330.0110.00722.04
8.1.320.0030.01016.13
8.1.310.0070.01016.86
8.1.300.0060.01316.17
8.1.290.0030.00618.88
8.1.280.0220.00325.92
8.1.270.0080.00023.82
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00422.63
8.1.230.0030.00921.04
8.1.220.0080.00017.77
8.1.210.0030.00618.77
8.1.200.0080.00017.35
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0040.00417.62
8.1.160.0040.00418.93
8.1.150.0000.00818.56
8.1.140.0040.00417.36
8.1.130.0030.00318.91
8.1.120.0040.00717.44
8.1.110.0030.00517.41
8.1.100.0000.00917.44
8.1.90.0070.00017.38
8.1.80.0070.00017.45
8.1.70.0000.00817.30
8.1.60.0070.00417.60
8.1.50.0100.00717.51
8.1.40.0040.00817.53
8.1.30.0210.00417.46
8.1.20.0210.00617.48
8.1.10.0210.00317.52
8.1.00.0180.00817.30
8.0.300.0050.00320.13
8.0.290.0040.00416.75
8.0.280.0030.00318.42
8.0.270.0030.00516.88
8.0.260.0080.00018.45
8.0.250.0030.00316.84
8.0.240.0000.00716.98
8.0.230.0080.00016.96
8.0.220.0030.00316.82
8.0.210.0030.00516.75
8.0.200.0000.00716.90
8.0.190.0060.00316.91
8.0.180.0110.00716.80
8.0.170.0160.00316.69
8.0.160.0160.00416.86
8.0.150.0040.00816.75
8.0.140.0140.00016.85
8.0.130.0000.01016.79
8.0.120.0130.00316.90
8.0.110.0100.00616.80
8.0.100.0130.00716.82
8.0.90.0190.00316.81
8.0.80.0170.00016.72
8.0.70.0130.00616.63
8.0.60.0170.00016.87
8.0.50.0060.00616.75
8.0.30.0180.00316.79
8.0.20.0110.01116.82
8.0.10.0100.01016.78
7.4.330.0000.00515.55
7.4.320.0040.00416.60
7.4.300.0040.00416.56
7.4.290.0180.00416.53
7.4.280.0200.00316.53
7.4.270.0270.00016.46
7.4.260.0170.00816.53
7.4.250.0140.00516.41
7.4.240.0190.00316.62
7.4.230.0200.00416.54
7.4.220.0070.00716.36
7.4.210.0100.00716.59
7.4.200.0000.01316.54
7.4.190.0150.00316.48
7.4.180.0190.00316.41
7.4.160.0210.00016.34
7.4.150.0160.00516.32
7.4.140.0150.00416.24
7.4.130.0170.00216.38
7.4.120.0070.00316.45
7.4.110.0080.00016.23
7.4.100.0070.00716.39
7.4.90.0110.00316.20
7.4.80.0150.00016.37
7.4.70.0040.00916.36
7.4.60.0090.00616.38
7.4.50.0130.00516.34
7.4.40.0070.00716.31
7.4.30.0070.01016.36
7.4.20.0090.00416.49
7.4.10.0100.00316.40
7.4.00.0050.00716.45

preferences:
33.95 ms | 403 KiB | 5 Q