3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'a' => '1GB - 4GB', 'b' => '1TB - 2TB', 'c' => '3TB - 5TB', 'd' => '5GB - 16GB', 'e' => '6TB+', 'f' => '17GB - 32GB', 'g' => '33GB - 63GB', 'h' => '64GB - 120GB', 'i' => '121GB - 200GB', 'j' => '201GB - 300GB', 'k' => '301GB - 500GB', 'l' => '501GB - 1TB', ]; $nums = []; $units = []; foreach ($array as $v) { [$nums[], $units[]] = sscanf($v, '%d%[A-Z]'); } array_multisort($units, $nums, $array); 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.0110.01017.76
8.4.130.0130.00719.40
8.4.120.0140.00320.39
8.4.110.0100.00922.58
8.4.100.0040.00518.83
8.4.90.0110.00922.32
8.4.80.0040.00518.85
8.4.70.0130.00818.88
8.4.60.0110.01118.82
8.4.50.0120.00818.66
8.4.40.0130.00617.88
8.4.30.0100.01018.97
8.4.20.0060.01317.88
8.4.10.0060.00322.23
8.3.270.0100.01016.37
8.3.260.0140.00516.61
8.3.250.0050.00218.85
8.3.240.0090.00916.52
8.3.230.0090.00316.78
8.3.220.0130.00619.10
8.3.210.0110.00716.70
8.3.200.0070.00216.84
8.3.190.0090.00917.16
8.3.180.0120.00718.70
8.3.170.0190.00016.85
8.3.160.0060.01317.25
8.3.150.0170.00319.04
8.3.140.0080.01120.71
8.3.130.0000.00818.40
8.3.120.0100.00718.82
8.3.110.0030.00620.94
8.3.100.0140.00324.06
8.3.90.0050.00326.77
8.3.80.0090.00018.28
8.3.70.0120.00816.75
8.3.60.0000.01618.43
8.3.50.0130.00720.46
8.3.40.0110.00420.30
8.3.30.0060.00918.82
8.3.20.0040.00724.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.290.0060.00316.89
8.2.280.0100.01018.44
8.2.270.0090.00916.48
8.2.260.0090.00916.63
8.2.250.0030.00616.73
8.2.240.0070.00417.13
8.2.230.0030.00522.58
8.2.220.0080.00037.54
8.2.210.0040.00426.77
8.2.200.0060.00316.50
8.2.190.0140.00716.88
8.2.180.0140.00025.92
8.2.170.0090.00619.08
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00026.16
8.2.110.0100.00021.03
8.2.100.0150.00018.03
8.2.90.0050.00319.27
8.2.80.0060.00317.97
8.2.70.0000.00817.60
8.2.60.0030.00718.05
8.2.50.0060.00318.07
8.2.40.0050.00318.34
8.2.30.0050.00318.00
8.2.20.0040.00419.19
8.2.10.0040.00417.94
8.2.00.0070.00019.22
8.1.330.0100.00821.85
8.1.320.0090.01016.23
8.1.310.0100.01016.01
8.1.300.0070.01118.38
8.1.290.0050.00530.84
8.1.280.0070.00725.92
8.1.270.0080.00023.98
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00622.66
8.1.230.0070.00417.89
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0050.00317.25
8.1.180.0070.00318.10
8.1.170.0080.00018.43
8.1.160.0000.00718.89
8.1.150.0000.00718.64
8.1.140.0080.00017.36
8.1.130.0000.00718.88
8.1.120.0000.00717.52
8.1.110.0040.00417.36
8.1.100.0150.00217.39
8.1.90.0060.00917.35
8.1.80.0150.00017.39
8.1.70.0110.00417.31
8.1.60.0000.00817.42
8.1.50.0120.00617.43
8.1.40.0100.00717.49
8.1.30.0100.00717.52
8.1.20.0000.01017.56
8.1.10.0170.00017.51
8.1.00.0120.00517.50
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.37
8.0.270.0040.00417.95
8.0.260.0000.00718.53
8.0.250.0070.00016.99
8.0.240.0080.00016.93
8.0.230.0070.00716.78
8.0.220.0120.00316.71
8.0.210.0150.00016.84
8.0.200.0130.00216.84
8.0.190.0140.00016.91
8.0.180.0070.00716.87
8.0.170.0070.00716.91
8.0.160.0090.00616.82
8.0.150.0130.00316.77
8.0.140.0120.00316.84
8.0.130.0080.00816.80
8.0.120.0080.00816.88
8.0.110.0110.00416.82
8.0.100.0090.00616.89
8.0.90.0120.00316.81
8.0.80.0070.00716.84
8.0.70.0110.00416.70
8.0.60.0050.00916.68
8.0.50.0110.00416.76
8.0.30.0170.00016.93
8.0.20.0100.00716.82
8.0.10.0130.00016.83
7.4.330.0050.00015.55
7.4.320.0000.00616.61
7.4.300.0070.00316.04
7.4.290.0030.00816.41
7.4.280.0110.00616.52
7.4.270.0090.00916.54
7.4.260.0170.00016.62
7.4.250.0110.00516.55
7.4.240.0080.00816.41
7.4.230.0040.00716.43
7.4.220.0000.01016.39
7.4.210.0070.00716.45
7.4.200.0050.01016.38
7.4.190.0100.00016.20
7.4.180.0070.00416.54
7.4.160.0100.00016.51
7.4.150.0100.00016.34
7.4.140.0030.00716.32
7.4.130.0040.00616.23
7.4.120.0070.00316.31
7.4.110.0070.00316.13
7.4.100.0000.01016.33
7.4.90.0110.00015.86
7.4.80.0050.00516.29
7.4.70.0050.00516.53
7.4.60.0070.00416.32
7.4.50.0070.00315.95
7.4.40.0050.00516.21
7.4.30.0030.00716.22
7.4.20.0070.00316.43
7.4.10.0050.00516.43
7.4.00.0070.00316.45

preferences:
29.63 ms | 403 KiB | 5 Q