3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ["id" => 10, "hits" => 80], ["id" => 14, "hits" => 50], ["id" => 15, "hits" => 700], ["id" => 18, "hits" => 200], ]; usort( $array, fn($a, $b) => [$a['id'] !== 18, $a['hits']] <=> [$b['id'] !== 18, $b['hits']] ); 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.5.10.0110.00816.93
8.5.00.0120.00920.02
8.4.150.0020.00114.05
8.4.140.0140.00817.59
8.4.130.0110.00917.72
8.4.120.0070.00324.27
8.4.110.0070.00622.41
8.4.100.0120.00518.56
8.4.90.0120.00818.83
8.4.80.0120.01020.71
8.4.70.0100.00918.24
8.4.60.0070.01318.58
8.4.50.0070.00720.61
8.4.40.0130.00617.89
8.4.30.0060.01218.75
8.4.20.0170.00319.55
8.4.10.0080.00019.43
8.3.280.0100.01318.48
8.3.270.0130.00616.84
8.3.260.0070.00416.54
8.3.250.0150.00319.17
8.3.240.0090.01017.22
8.3.230.0060.01216.45
8.3.220.0130.00518.93
8.3.210.0110.00816.61
8.3.200.0030.00516.50
8.3.190.0140.00418.80
8.3.180.0120.00817.09
8.3.170.0100.00720.60
8.3.160.0140.00317.11
8.3.150.0110.00717.35
8.3.140.0080.00018.40
8.3.130.0060.00318.36
8.3.120.0050.00520.61
8.3.110.0030.01616.38
8.3.100.0120.00324.06
8.3.90.0050.00326.77
8.3.80.0000.00918.18
8.3.70.0120.00318.21
8.3.60.0190.00318.21
8.3.50.0120.00316.79
8.3.40.0170.00321.29
8.3.30.0100.01020.89
8.3.20.0070.01123.30
8.3.10.0150.00423.55
8.3.00.0170.00320.72
8.2.290.0140.00520.16
8.2.280.0140.00718.41
8.2.270.0060.01217.59
8.2.260.0040.00418.48
8.2.250.0050.00316.49
8.2.240.0040.00418.85
8.2.230.0040.00420.94
8.2.220.0000.00937.54
8.2.210.0100.01026.77
8.2.200.0080.00016.63
8.2.190.0180.00416.58
8.2.180.0070.00716.50
8.2.170.0070.01020.68
8.2.160.0100.01020.13
8.2.150.0140.00719.27
8.2.140.0130.00720.43
8.2.130.0140.00720.26
8.2.120.0120.00819.39
8.2.110.0040.01519.43
8.2.100.0030.01719.22
8.2.90.0090.00618.81
8.2.80.0110.00419.40
8.2.70.0170.00318.80
8.2.60.0120.00319.07
8.2.50.0060.00919.14
8.2.40.0040.01118.57
8.2.30.0130.00718.68
8.2.20.0120.00618.82
8.2.10.0180.00018.68
8.2.00.0090.00918.77
8.1.330.0090.01022.08
8.1.320.0120.00716.12
8.1.310.0140.00318.30
8.1.300.0070.01016.15
8.1.290.0030.00630.84
8.1.280.0120.00325.92
8.1.270.0140.00322.14
8.1.260.0130.00722.07
8.1.250.0090.00622.07
8.1.240.0110.00418.45
8.1.230.0160.00618.62
8.1.220.0100.01018.95
8.1.210.0090.00618.54
8.1.200.0120.00318.93
8.1.190.0110.01118.82
8.1.180.0190.00318.25
8.1.170.0070.00718.82
8.1.160.0090.00618.39
8.1.150.0100.00618.73
8.1.140.0080.00818.70
8.1.130.0120.00318.82
8.1.120.0080.00818.64
8.1.110.0120.00318.68
8.1.100.0040.01219.68
8.1.90.0110.00718.66
8.1.80.0090.00919.72
8.1.70.0090.00918.80
8.1.60.0140.00420.60
8.1.50.0070.00720.54
8.1.40.0060.00920.50
8.1.30.0070.00718.85
8.1.20.0140.00420.00
8.1.10.0120.00318.59
8.1.00.0040.01118.48
5.6.40.0220.00216.49

preferences:
80.7 ms | 403 KiB | 5 Q