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" ]; uasort( $array, function($a, $b) { sscanf($a, '%f%s', $amountA, $unitA); sscanf($b, '%f%s', $amountB, $unitB); return $amountA * UNIT_FACTOR[$unitA] <=> $amountB * UNIT_FACTOR[$unitB]; } ); 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.0190.00817.30
8.4.130.0100.01117.48
8.4.120.0130.00720.80
8.4.110.0120.01218.77
8.4.100.0080.00717.77
8.4.90.0100.00922.60
8.4.80.0050.00518.91
8.4.70.0110.00818.76
8.4.60.0120.00918.71
8.4.50.0130.01017.82
8.4.40.0070.01322.22
8.4.30.0200.00018.76
8.4.20.0100.01017.72
8.4.10.0100.01022.22
8.3.270.0150.00716.59
8.3.260.0060.00316.69
8.3.250.0110.00818.99
8.3.240.0110.01016.64
8.3.230.0120.01016.66
8.3.220.0050.00318.87
8.3.210.0090.00916.73
8.3.200.0030.00616.62
8.3.190.0050.00317.22
8.3.180.0100.01016.80
8.3.170.0090.00916.64
8.3.160.0090.00916.61
8.3.150.0130.00716.90
8.3.140.0130.00616.48
8.3.130.0040.00418.21
8.3.120.0070.00718.95
8.3.110.0050.00316.63
8.3.100.0090.00624.06
8.3.90.0060.00626.77
8.3.80.0100.00016.75
8.3.70.0170.00016.58
8.3.60.0030.01216.75
8.3.50.0140.00720.03
8.3.40.0150.00018.79
8.3.30.0040.01119.27
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.290.0120.00720.45
8.2.280.0070.00318.73
8.2.270.0120.00616.93
8.2.260.0080.00016.93
8.2.250.0060.00318.26
8.2.240.0090.00019.15
8.2.230.0080.00020.94
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0090.00316.50
8.2.190.0070.01016.58
8.2.180.0060.01225.92
8.2.170.0060.01019.08
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.87
8.2.110.0060.00322.12
8.2.100.0080.00417.91
8.2.90.0050.00317.75
8.2.80.0060.00318.96
8.2.70.0000.00818.05
8.2.60.0040.00417.75
8.2.50.0030.00617.98
8.2.40.0030.00619.94
8.2.30.0030.00618.01
8.2.20.0040.00420.44
8.2.10.0000.00818.13
8.2.00.0050.00519.31
8.1.330.0110.00821.82
8.1.320.0110.00816.45
8.1.310.0180.00017.77
8.1.300.0070.01118.50
8.1.290.0000.01118.88
8.1.280.0070.01125.92
8.1.270.0000.00723.99
8.1.260.0100.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00321.91
8.1.230.0040.00820.91
8.1.220.0000.00717.79
8.1.210.0040.00418.77
8.1.200.0050.00317.48
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0050.00218.77
8.1.150.0040.00418.65
8.1.140.0040.00417.34
8.1.130.0070.00019.11
8.1.120.0060.00317.47
8.1.110.0000.00817.43
8.1.100.0000.00817.43
8.1.90.0070.00017.38
8.1.80.0080.00017.43
8.1.70.0000.00717.47
8.1.60.0060.00617.45
8.1.50.0120.00817.54
8.1.40.0050.00317.39
8.1.30.0120.00817.59
8.1.20.0130.01017.63
8.1.10.0180.00617.59
8.1.00.0200.00317.44
8.0.300.0070.00018.77
8.0.290.0040.00416.58
8.0.280.0030.00318.45
8.0.270.0030.00316.82
8.0.260.0040.00416.88
8.0.250.0000.00816.99
8.0.240.0000.00716.95
8.0.230.0000.00716.99
8.0.220.0030.00316.83
8.0.210.0040.00316.72
8.0.200.0030.00316.84
8.0.190.0030.00616.98
8.0.180.0170.00316.77
8.0.170.0110.00816.85
8.0.160.0120.00816.80
8.0.150.0070.00516.77
8.0.140.0070.00716.77
8.0.130.0110.00716.77
8.0.120.0140.00616.84
8.0.110.0080.01216.91
8.0.100.0160.00416.86
8.0.90.0120.00616.88
8.0.80.0070.00716.84
8.0.70.0150.00416.75
8.0.60.0100.00716.79
8.0.50.0000.00916.91
8.0.30.0140.00016.77
8.0.20.0130.00316.86
8.0.10.0140.00716.95
7.4.330.0030.00315.55
7.4.320.0000.00616.45
7.4.300.0000.00616.51
7.4.290.0090.00016.42
7.4.280.0150.00616.57
7.4.270.0140.01116.31
7.4.260.0180.00716.54
7.4.250.0100.00716.37
7.4.240.0130.00816.54
7.4.230.0210.00316.52
7.4.220.0130.00616.49
7.4.210.0120.00416.45
7.4.200.0140.00016.54
7.4.190.0060.00916.68
7.4.180.0130.00416.49
7.4.160.0120.00816.40
7.4.150.0090.00316.43
7.4.140.0070.00516.30
7.4.130.0130.00016.24
7.4.120.0090.00816.52
7.4.110.0070.01016.41
7.4.100.0120.00816.57
7.4.90.0110.00816.26
7.4.80.0170.00416.23
7.4.70.0090.00916.54
7.4.60.0130.00416.39
7.4.50.0140.00316.43
7.4.40.0190.00016.34
7.4.30.0180.00416.41
7.4.20.0090.00216.40
7.4.10.0000.00816.43
7.4.00.0110.00016.35

preferences:
30.12 ms | 403 KiB | 5 Q