3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "A - 1.0 - Title Page.PDF", "A - 2.2 - Enlarged Floor Plans", "A - 2.1.0 - Structural Details.PDF", "E - 1.0 - Electrical Title Page.PDF", "A - 1.2 - Floor Plan.PDF", "P - 1.0 - Plumbing Title Page2.PDF", "A - 2.1.1 - Structural Details.PDF", "C - 1.0 - Civil Title Page.PDF", "M - 1.0 - Mechanical Title Page.PDF", "ESC - 1.0 - Erosion Control Plan.PDF", "P - 1.0 - Plumbing Title Page.PDF", ]; $priorities = array_flip(['A', 'ESC', 'C', 'M', 'E', 'P']); usort($arr, function ($a, $b) use ($priorities) { [$categoryA, $versionA, $nameA] = explode(' - ', $a, 3); [$categoryB, $versionB, $nameB] = explode(' - ', $b, 3); return $priorities[$categoryA] <=> $priorities[$categoryB] // priorities as first criteria ?: version_compare($versionB, $versionA) // then descending versions as second criteria ?: $nameA <=> $nameB; // then compare names ascending }); var_export($arr);

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.130.0120.00318.35
8.3.120.0070.00418.86
8.3.110.0090.00020.94
8.3.100.0120.00924.06
8.3.90.0040.00426.77
8.3.80.0060.00316.75
8.3.70.0180.00016.58
8.3.60.0090.00916.38
8.3.50.0160.00423.59
8.3.40.0150.00319.27
8.3.30.0000.01418.58
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.250.0120.00318.34
8.2.240.0150.00017.16
8.2.230.0000.00822.58
8.2.220.0040.00437.54
8.2.210.0080.00026.77
8.2.200.0060.00318.16
8.2.190.0070.00718.54
8.2.180.0080.00825.92
8.2.170.0140.00719.08
8.2.160.0090.00522.96
8.2.150.0000.00825.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0050.00321.13
8.2.110.0060.00322.26
8.2.100.0090.00317.88
8.2.90.0040.00417.75
8.2.80.0040.00418.78
8.2.70.0000.00818.05
8.2.60.0000.00818.22
8.2.50.0040.00418.10
8.2.40.0000.00719.36
8.2.30.0070.00019.38
8.2.20.0040.00418.20
8.2.10.0040.00419.38
8.2.00.0040.00419.28
8.1.300.0000.00817.71
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0090.00023.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00024.02
8.1.230.0060.00619.48
8.1.220.0040.00417.77
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0040.00418.48
8.1.160.0000.00819.03
8.1.150.0050.00318.89
8.1.140.0040.00418.91
8.1.130.0000.00820.15
8.1.120.0030.00617.49
8.1.110.0000.00817.50
8.1.100.0050.00317.50
8.1.90.0040.00417.44
8.1.80.0080.00017.38
8.1.70.0000.00717.47
8.1.60.0000.00717.55
8.1.50.0030.00617.47
8.1.40.0040.00417.55
8.1.30.0000.00817.70
8.1.20.0040.00417.63
8.1.10.0080.00017.66
8.1.00.0120.00017.41
8.0.300.0020.00518.77
8.0.290.0050.00316.63
8.0.280.0000.00718.36
8.0.270.0060.00316.86
8.0.260.0040.00420.19
8.0.250.0080.00017.00
8.0.240.0000.00616.94
8.0.230.0030.00316.96
8.0.220.0000.00916.87
8.0.210.0030.00316.92
8.0.200.0030.00316.88
8.0.190.0030.00716.92
8.0.180.0030.00617.01
8.0.170.0030.00616.91
8.0.160.0000.00716.93
8.0.150.0040.00416.88
8.0.140.0050.00316.92
8.0.130.0060.00013.37
8.0.120.0000.00716.91
8.0.110.0000.00716.70
8.0.100.0070.00016.80
8.0.90.0060.00316.83
8.0.80.0120.00316.85
8.0.70.0040.00416.77
8.0.60.0000.00816.89
8.0.50.0070.00016.84
8.0.30.0100.01417.15
8.0.20.0100.01016.81
8.0.10.0040.00417.03
8.0.00.0090.01216.93
7.4.330.0060.00015.55
7.4.320.0030.00316.50
7.4.300.0000.00616.42
7.4.290.0070.00016.36
7.4.280.0050.00316.45
7.4.270.0000.00716.50
7.4.260.0060.00013.25
7.4.250.0030.00516.42
7.4.240.0050.00216.59
7.4.230.0050.00216.41
7.4.220.0070.00016.42
7.4.210.0110.00616.64
7.4.200.0030.00316.68
7.4.130.0090.01116.47
7.4.120.0130.01416.65
7.4.110.0150.00716.49
7.4.100.0130.00316.43
7.4.90.0140.00616.41
7.4.80.0120.00619.39
7.4.70.0130.01016.66
7.4.60.0090.01216.57
7.4.50.0060.01116.45
7.4.40.0100.00616.11
7.4.30.0090.00616.36
7.4.20.0060.00916.23
7.4.10.0160.00016.64
7.4.00.0170.00016.26
7.3.330.0030.00316.43
7.3.320.0020.00313.20
7.3.310.0000.00716.37
7.3.300.0000.00616.25
7.3.290.0050.00816.35
7.3.280.0100.00716.37
7.3.260.0080.01116.61
7.3.240.0070.01016.46
7.3.230.0100.00716.47
7.3.210.0070.01016.59
7.3.200.0030.01316.50
7.3.190.0090.00616.61
7.3.180.0070.01416.46
7.3.170.0100.00616.28
7.3.160.0110.00516.28
7.3.150.0090.00616.54
7.3.140.0070.01016.46
7.3.130.0160.00016.55
7.3.120.0130.00616.44
7.3.110.0120.00916.35
7.3.100.0060.01016.27
7.3.90.0130.00316.49
7.3.80.0100.00716.41
7.3.70.0060.01016.38
7.3.60.0110.00516.49
7.3.50.0150.00616.37
7.3.40.0060.00916.41
7.3.30.0000.01616.33
7.3.20.0160.00616.44
7.3.10.0140.00416.45
7.3.00.0100.00616.53
7.2.330.0100.01316.74
7.2.320.0110.00616.69
7.2.310.0060.01116.46
7.2.300.0030.01516.57
7.2.290.0130.00316.39
7.2.280.0090.00616.38
7.2.270.0030.01316.64
7.2.260.0170.00016.77
7.2.250.0030.01916.62
7.2.240.0030.01316.54
7.2.230.0110.00616.55
7.2.220.0030.01316.50
7.2.210.0170.00016.52
7.2.200.0060.01116.80
7.2.190.0090.01316.51
7.2.180.0100.01316.67
7.2.170.0100.00716.47
7.2.160.0130.00316.76
7.2.150.0040.01216.50
7.2.140.0130.00616.59
7.2.130.0100.01016.48
7.2.120.0090.00616.55
7.2.110.0070.01016.40
7.2.100.0060.00916.43
7.2.90.0080.01116.67
7.2.80.0070.01116.72
7.2.70.0100.00716.41
7.2.60.0120.00616.75
7.2.50.0090.00916.80
7.2.40.0390.01016.53
7.2.30.0100.01316.53
7.2.20.0130.00416.71
7.2.10.0090.01516.61
7.2.00.0090.00916.34

preferences:
27.15 ms | 403 KiB | 5 Q