3v4l.org

run code in 300+ PHP versions simultaneously
<?php $unsorted = [ "3470U11", "3470E11", "3470S13", "3470G11", "3470S12", "3470S11", "3470E12", "3470U12", "3470G13", "3470G12", "3470E13", "3470U13" ]; $sortBy = ['G', 'D', 'S', 'U', 'E', 'T', 'A', 'L']; $priority = array_flip($sortBy); usort( $unsorted, fn($a, $b) => ($priority[substr($a, -3, 1)] <=> $priority[substr($b, -3, 1)]) ?: $a <=> $b ); var_export ($unsorted);

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.60.0150.00416.63
8.3.50.0070.00720.34
8.3.40.0110.00718.84
8.3.30.0060.00918.55
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00726.16
8.2.180.0090.01225.92
8.2.170.0100.00618.91
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00726.16
8.2.110.0050.00520.53
8.2.100.0090.00317.78
8.2.90.0000.00819.12
8.2.80.0000.00817.97
8.2.70.0000.00917.50
8.2.60.0050.00318.05
8.2.50.0000.00818.07
8.2.40.0090.00017.91
8.2.30.0040.00418.16
8.2.20.0040.00420.37
8.2.10.0050.00317.73
8.2.00.0000.00819.32
8.1.280.0120.00325.92
8.1.270.0080.00023.90
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00722.81
8.1.230.0080.00417.51
8.1.220.0030.00617.74
8.1.210.0090.00018.77
8.1.200.0030.00617.36
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0040.00418.70
8.1.160.0000.00818.82
8.1.150.0000.00818.64
8.1.140.0040.00417.45
8.1.130.0000.00718.96
8.1.120.0080.00017.48
8.1.110.0000.00817.52
8.1.100.0040.00417.45
8.1.90.0040.00417.36
8.1.80.0030.00617.35
8.1.70.0000.00717.48
8.1.60.0060.00317.48
8.1.50.0000.00917.53
8.1.40.0040.00417.41
8.1.30.0000.00917.71
8.1.20.0030.00717.64
8.1.10.0180.00617.52
8.1.00.0210.00417.52
8.0.300.0020.00518.77
8.0.290.0070.00016.63
8.0.280.0000.00718.36
8.0.270.0070.00016.75
8.0.260.0040.00418.54
8.0.250.0030.00316.85
8.0.240.0070.00016.92
8.0.230.0060.00016.91
8.0.220.0030.00316.87
8.0.210.0070.00016.87
8.0.200.0030.00316.88
8.0.190.0000.00816.91
8.0.180.0030.00616.90
8.0.170.0090.00016.79
8.0.160.0040.00416.77
8.0.150.0100.00016.84
8.0.140.0150.00816.80
8.0.130.0160.00516.72
8.0.120.0170.00316.82
8.0.110.0150.00416.84
8.0.100.0140.00616.88
8.0.90.0120.00616.81
8.0.80.0140.00316.83
8.0.70.0140.00516.77
8.0.60.0150.00516.69
8.0.50.0140.00516.74
8.0.30.0180.00016.66
8.0.20.0100.00916.88
8.0.10.0030.00517.00
7.4.330.0020.00215.55
7.4.320.0070.00016.65
7.4.300.0030.00316.62
7.4.290.0030.00616.51
7.4.280.0040.00416.46
7.4.270.0040.00416.58
7.4.260.0140.00716.49
7.4.250.0130.01016.40
7.4.240.0170.00616.59
7.4.230.0140.00416.45
7.4.220.0140.00316.41
7.4.210.0180.00316.40
7.4.200.0180.00416.45
7.4.190.0140.00716.63
7.4.180.0170.00316.42
7.4.160.0170.00316.54
7.4.150.0170.00316.32
7.4.140.0180.00316.35
7.4.130.0180.00516.43
7.4.120.0200.00016.45
7.4.110.0200.00316.29
7.4.100.0100.00716.43
7.4.90.0110.00416.42
7.4.80.0060.00616.35
7.4.70.0100.00215.86
7.4.60.0150.00016.41
7.4.50.0120.00016.05
7.4.40.0080.00416.11
7.4.30.0030.00916.21
7.4.20.0050.00916.39
7.4.10.0090.00316.10
7.4.00.0050.00716.34

preferences:
32.35 ms | 400 KiB | 5 Q