3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numericPriorities = array_flip([5, 4, 65]); $numericOutlier = count($numericPriorities); $wordPriorities = array_flip(['first', 'second', 'third']); $wordOutlier = count($wordPriorities); $arr = ['third' => 321, 4 => 1, 'zero' => 'last of words', 7 => 'last of nums', 65 => 6, 'first' => 63, 5 => 88, 'second' => 0]; uksort( $arr, function($a, $b) use ($numericPriorities, $numericOutlier, $wordPriorities, $wordOutlier) { return [!is_int($a), $numericPriorities[$a] ?? $numericOutlier, $wordPriorities[$a] ?? $wordOutlier] <=> [!is_int($b), $numericPriorities[$b] ?? $numericOutlier, $wordPriorities[$b] ?? $wordOutlier]; } ); 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.4.130.0070.00517.57
8.4.120.0090.00820.80
8.4.110.0090.01120.52
8.4.100.0140.00717.77
8.4.90.0060.00318.63
8.4.80.0040.00418.00
8.4.70.0060.00318.04
8.4.60.0100.00918.73
8.4.50.0120.00820.42
8.4.40.0060.00717.62
8.4.30.0100.00720.32
8.4.20.0100.01017.91
8.4.10.0090.00020.63
8.3.260.0080.00716.49
8.3.250.0080.00118.76
8.3.240.0100.01016.50
8.3.230.0110.00616.74
8.3.220.0070.00317.22
8.3.210.0100.01016.61
8.3.200.0040.00416.57
8.3.190.0070.01016.86
8.3.180.0040.00418.53
8.3.170.0090.00917.13
8.3.160.0130.00716.54
8.3.150.0040.00419.14
8.3.140.0090.00917.09
8.3.130.0000.00916.57
8.3.120.0130.00619.00
8.3.110.0030.00620.94
8.3.100.0160.00024.06
8.3.90.0030.00626.77
8.3.80.0030.00716.63
8.3.70.0140.00716.63
8.3.60.0090.01218.15
8.3.50.0100.01023.70
8.3.40.0150.00021.95
8.3.30.0130.00318.85
8.3.20.0070.00024.18
8.3.10.0110.00424.66
8.3.00.0000.00826.16
8.2.290.0140.00120.79
8.2.280.0110.00920.04
8.2.270.0140.00417.28
8.2.260.0050.00316.62
8.2.250.0000.00817.02
8.2.240.0070.01017.08
8.2.230.0030.00522.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0060.00318.42
8.2.190.0000.01616.63
8.2.180.0060.01325.92
8.2.170.0070.01018.85
8.2.160.0030.01222.96
8.2.150.0030.00625.66
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.66
8.2.110.0060.00321.07
8.2.100.0080.00417.91
8.2.90.0050.00317.63
8.2.80.0050.00518.81
8.2.70.0030.00617.63
8.2.60.0060.00317.63
8.2.50.0050.00518.05
8.2.40.0040.00418.28
8.2.30.0030.00618.09
8.2.20.0050.00318.06
8.2.10.0030.00519.20
8.2.00.0000.00719.20
8.1.330.0130.00521.92
8.1.320.0060.00716.43
8.1.310.0070.01316.50
8.1.300.0030.00616.19
8.1.290.0100.00030.84
8.1.280.0100.01025.92
8.1.270.0030.00522.13
8.1.260.0050.00326.35
8.1.250.0000.00928.09
8.1.240.0090.00023.92
8.1.230.0070.00420.88
8.1.220.0040.00418.51
8.1.210.0060.00318.77
8.1.200.0030.00617.47
8.1.190.0000.00817.51
8.1.180.0000.00818.10
8.1.170.0080.00018.49
8.1.160.0000.00718.98
8.1.150.0080.00018.94
8.1.140.0000.00818.96
8.1.130.0040.00417.54
8.1.120.0030.00517.50
8.1.110.0080.00017.36
8.1.100.0020.00517.47
8.1.90.0040.00417.36
8.1.80.0070.00017.45
8.1.70.0000.00717.39
8.1.60.0030.00617.61
8.1.50.0030.00617.59
8.1.40.0080.00017.50
8.1.30.0000.00717.64
8.1.20.0040.00417.67
8.1.10.0060.00617.43
8.1.00.0000.00817.49
8.0.300.0000.00720.03
8.0.290.0040.00416.63
8.0.280.0030.00318.38
8.0.270.0000.00718.05
8.0.260.0030.00316.77
8.0.250.0030.00316.86
8.0.240.0080.00017.04
8.0.230.0030.00316.82
8.0.220.0030.00316.84
8.0.210.0000.00716.80
8.0.200.0000.00716.97
8.0.190.0000.00816.86
8.0.180.0070.00016.91
8.0.170.0040.00416.89
8.0.160.0040.00416.86
8.0.150.0040.00316.91
8.0.140.0000.00716.82
8.0.130.0000.00513.37
8.0.120.0040.00416.89
8.0.110.0030.00516.91
8.0.100.0040.00416.92
8.0.90.0000.00816.86
8.0.80.0060.01316.82
8.0.70.0080.00016.70
8.0.60.0040.00416.92
8.0.50.0000.00716.73
8.0.30.0040.01216.98
8.0.20.0080.01117.08
8.0.10.0040.00416.98
8.0.00.0190.00816.59
7.4.330.0000.00515.55
7.4.320.0030.00316.48
7.4.300.0030.00316.64
7.4.290.0080.00016.37
7.4.280.0000.00716.58
7.4.270.0000.00816.38
7.4.260.0000.00513.35
7.4.250.0040.00416.43
7.4.240.0000.00716.62
7.4.230.0040.00416.71
7.4.220.0020.00516.50
7.4.210.0090.00716.54
7.4.200.0030.00316.54
7.4.130.0030.01516.46
7.4.120.0150.00316.55
7.4.110.0050.01816.72
7.4.100.0060.01316.47
7.4.90.0060.01216.52
7.4.80.0080.00816.65
7.4.70.0150.00416.42
7.4.60.0080.01016.31
7.4.50.0060.01716.50
7.4.40.0030.01516.57
7.4.30.0100.00816.51
7.4.20.0140.00416.28
7.4.10.0090.01116.66
7.4.00.0090.00916.71
7.3.330.0000.01016.32
7.3.320.0050.00013.45
7.3.310.0000.00716.38
7.3.300.0070.00016.38
7.3.290.0090.00716.40
7.3.260.0070.01116.30
7.3.230.0090.00916.54
7.3.220.0100.01216.38
7.3.210.0130.00516.59
7.3.200.0120.00416.73
7.3.190.0080.00816.49
7.3.180.0050.01116.54
7.3.170.0060.01216.37
7.3.160.0080.00816.57
7.3.150.0100.00516.45
7.3.140.0130.00616.41
7.3.130.0130.00516.43
7.3.120.0040.01216.37
7.3.110.0070.01016.36
7.3.100.0080.01616.43
7.3.90.0140.00616.57
7.3.80.0160.00016.48
7.3.70.0130.00316.42
7.3.60.0040.01416.32
7.3.50.0080.00816.51
7.3.40.0110.00616.39
7.3.30.0070.01116.34
7.3.20.0150.00916.36
7.3.10.0110.00716.45
7.3.00.0150.00316.49
7.2.340.0070.01116.43
7.2.330.0100.01016.57
7.2.320.0120.00816.55
7.2.310.0060.01216.78
7.2.300.0070.01416.63
7.2.290.0090.00916.68
7.2.280.0110.00716.58
7.2.270.0090.01016.79
7.2.260.0090.01016.86
7.2.250.0080.01216.68
7.2.240.0120.00416.60
7.2.230.0090.01416.82
7.2.220.0080.00816.44
7.2.210.0110.00816.50
7.2.200.0080.01116.79
7.2.190.0140.00516.70
7.2.180.0100.01016.64
7.2.170.0030.01616.68
7.2.160.0080.00816.46
7.2.150.0340.00616.57
7.2.140.0000.01716.60
7.2.130.0140.00616.55
7.2.120.0100.00816.71
7.2.110.0100.01416.65
7.2.100.0080.01116.67
7.2.90.0070.01416.63
7.2.80.0000.02016.67
7.2.70.0110.01516.70
7.2.60.0200.00316.62
7.2.50.0170.00416.54
7.2.40.0130.01316.82
7.2.30.0100.01016.80
7.2.20.0080.01316.62
7.2.10.0120.01016.68
7.2.00.0210.00916.49

preferences:
30.83 ms | 403 KiB | 5 Q