3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = array( "apple" => 2, "orange" => 5, "banana" => 3, "kiwi" => 1, ); $specialKey = "banana"; uksort( $myArray, fn($a, $b) => [$a !== $specialKey, $a] <=> [$b !== $specialKey, $b] ); var_export($myArray);

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.5.10.0090.01121.74
8.5.00.0110.01120.03
8.4.160.0120.01123.92
8.4.150.0020.00014.05
8.4.140.0180.00917.45
8.4.130.0120.00817.82
8.4.120.0140.00621.96
8.4.110.0080.00318.95
8.4.100.0120.00818.00
8.4.90.0050.00522.30
8.4.80.0110.00819.60
8.4.70.0100.00917.79
8.4.60.0130.00817.76
8.4.50.0160.00517.60
8.4.40.0040.00417.75
8.4.30.0080.01120.54
8.4.20.0120.00625.82
8.4.10.0090.00023.89
8.3.280.0130.00718.47
8.3.270.0150.00416.58
8.3.260.0120.00816.86
8.3.250.0070.00718.88
8.3.240.0120.00716.56
8.3.230.0070.01116.57
8.3.220.0050.00318.81
8.3.210.0090.00916.41
8.3.200.0090.00916.56
8.3.190.0050.00316.72
8.3.180.0090.00916.80
8.3.170.0040.01518.83
8.3.160.0120.00620.11
8.3.150.0070.01116.90
8.3.140.0090.00918.10
8.3.130.0150.00318.45
8.3.120.0030.00620.55
8.3.110.0080.01220.94
8.3.100.0070.00424.06
8.3.90.0050.00326.77
8.3.80.0060.00317.97
8.3.70.0180.00318.10
8.3.60.0030.01216.38
8.3.50.0070.01018.37
8.3.40.0150.00619.94
8.3.30.0080.00818.90
8.3.20.0080.00024.18
8.3.10.0060.00324.66
8.3.00.0040.00426.16
8.2.290.0110.00718.73
8.2.280.0100.00916.69
8.2.270.0050.00317.44
8.2.260.0070.01116.69
8.2.250.0070.00716.68
8.2.240.0110.00718.90
8.2.230.0040.00422.58
8.2.220.0140.00337.54
8.2.210.0030.00526.77
8.2.200.0050.00316.50
8.2.190.0040.01118.30
8.2.180.0140.00718.41
8.2.170.0100.01018.95
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0060.00326.16
8.2.120.0040.00426.16
8.2.110.0040.00421.18
8.2.100.0120.00017.91
8.2.90.0060.00317.75
8.2.80.0080.00018.73
8.2.70.0000.00817.63
8.2.60.0040.00417.50
8.2.50.0040.00417.55
8.2.40.0150.00217.63
8.2.30.0130.00417.63
8.2.20.0150.00017.62
8.2.10.0160.00017.62
8.2.00.0050.01017.62
8.1.330.0070.01118.37
8.1.320.0060.00517.93
8.1.310.0100.00718.52
8.1.300.0110.00418.21
8.1.290.0030.00630.84
8.1.280.0040.01125.92
8.1.270.0000.00724.66
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0090.00323.86
8.1.230.0110.00022.69
8.1.220.0000.00818.75
8.1.210.0050.00518.89
8.1.200.0060.00317.35
8.1.190.0040.00417.00
8.1.180.0080.00018.10
8.1.170.0130.00317.62
8.1.160.0160.00017.62
8.1.150.0120.00417.62
8.1.140.0110.00517.62
8.1.130.0140.00317.62
8.1.120.0170.00017.62
8.1.110.0180.00017.62
8.1.100.0160.00017.62
8.1.90.0110.00917.62
8.1.80.0130.00517.62
8.1.70.0050.01417.62
8.1.60.0080.01317.62
8.1.50.0060.01217.62
8.1.40.0080.00817.62
8.1.30.0150.00317.62
8.1.20.0160.00317.62
8.1.10.0090.00917.62
8.1.00.0120.00617.62
8.0.300.0050.00220.07
8.0.290.0060.00316.75
8.0.280.0090.00717.62
8.0.270.0100.00717.62
8.0.260.0100.00617.62
8.0.250.0150.00017.62
8.0.240.0070.00717.62
8.0.230.0110.00517.62
8.0.220.0140.00417.62
8.0.210.0110.00617.62
8.0.200.0100.00617.62
8.0.190.0090.00917.62
8.0.180.0140.00417.62
8.0.170.0070.01017.62
8.0.160.0140.00517.62
8.0.150.0170.00017.62
8.0.140.0150.00317.62
8.0.130.0160.00017.62
8.0.120.0130.00417.62
8.0.110.0120.00417.62
8.0.100.0140.00717.62
8.0.90.0100.00517.62
8.0.80.0160.00017.62
8.0.70.0000.01717.62
8.0.60.0090.00917.62
8.0.50.0000.01517.62
8.0.30.0100.00517.62
8.0.20.0050.01117.62
8.0.10.0080.00817.62

preferences:
35.86 ms | 403 KiB | 5 Q