3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['foo-test' => [1], '-' => [2], 'bar-test' => [3]]; uksort($a, function($x, $y) use (&$a) { if (!isset($a[$x])) { // throw new Exception("Key '{$x}' not found."); } if (!isset($a[$y])) { // throw new Exception("Key '{$y}' not found."); } return $x < $y; });

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.0070.00716.88
8.3.50.0130.00721.28
8.3.40.0070.00718.84
8.3.30.0080.00818.67
8.3.20.0040.00420.35
8.3.10.0030.00521.90
8.3.00.0050.00323.62
8.2.180.0120.00616.63
8.2.170.0110.00422.96
8.2.160.0070.00720.44
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0040.00421.02
8.2.120.0030.00626.35
8.2.110.0080.00321.02
8.2.100.0090.00318.05
8.2.90.0000.00819.35
8.2.80.0040.00417.97
8.2.70.0030.00617.38
8.2.60.0040.00418.16
8.2.50.0000.00818.09
8.2.40.0040.00422.37
8.2.30.0040.00419.51
8.2.20.0000.00817.80
8.2.10.0030.00518.12
8.2.00.0070.00018.12
8.1.280.0140.00325.92
8.1.270.0080.00022.20
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00422.65
8.1.230.0060.00617.83
8.1.220.0000.00917.74
8.1.210.0060.00318.77
8.1.200.0100.00017.23
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0100.00018.57
8.1.160.0040.00420.77
8.1.150.0000.00719.00
8.1.140.0000.00819.65
8.1.130.0000.00717.70
8.1.120.0000.00717.47
8.1.110.0000.00717.45
8.1.100.0030.00517.43
8.1.90.0000.00817.43
8.1.80.0040.00417.33
8.1.70.0030.00317.44
8.1.60.0000.00817.47
8.1.50.0050.00317.54
8.1.40.0080.00017.54
8.1.30.0040.00417.62
8.1.20.0050.00317.65
8.1.10.0030.00517.46
8.1.00.0020.00517.48
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0030.00318.50
8.0.270.0070.00017.25
8.0.260.0040.00417.30
8.0.250.0040.00417.00
8.0.240.0000.00817.03
8.0.230.0030.00316.98
8.0.220.0070.00016.83
8.0.210.0040.00416.86
8.0.200.0000.00616.90
8.0.190.0070.00017.05
8.0.180.0000.00717.01
8.0.170.0080.00016.87
8.0.160.0080.00316.96
8.0.150.0060.00616.96
8.0.140.0000.00816.82
8.0.130.0030.00313.41
8.0.120.0000.00816.81
8.0.110.0080.00016.88
8.0.100.0040.00416.98
8.0.90.0040.00416.77
8.0.80.0040.01016.96
8.0.70.0040.00416.93
8.0.60.0000.00816.75
8.0.50.0070.00016.85
8.0.30.0100.00817.30
8.0.20.0080.01117.40
8.0.10.0040.00417.13
8.0.00.0120.00716.93
7.4.330.0000.00516.71
7.4.320.0070.00016.40
7.4.300.0000.00716.51
7.4.290.0030.00616.51
7.4.280.0040.00416.41
7.4.270.0030.00316.60
7.4.260.0000.00716.43
7.4.250.0060.00316.54
7.4.240.0050.00316.49
7.4.230.0070.00016.34
7.4.220.0070.01016.61
7.4.210.0040.00916.52
7.4.200.0070.00016.66
7.4.160.0100.01016.59
7.4.150.0110.00717.40
7.4.140.0120.00917.86
7.4.130.0120.00616.64
7.4.120.0070.01016.48
7.4.110.0030.02016.43
7.4.100.0070.01116.57
7.4.90.0080.00916.48
7.4.80.0150.00719.39
7.4.70.0130.00316.54
7.4.60.0100.00716.32
7.4.50.0110.00716.42
7.4.40.0100.01316.49
7.4.30.0130.00316.51
7.4.00.0090.00915.11
7.3.330.0090.00013.26
7.3.320.0050.00013.30
7.3.310.0000.00716.36
7.3.300.0030.00316.17
7.3.290.0120.00416.34
7.3.280.0120.00816.28
7.3.270.0090.00917.40
7.3.260.0140.00916.54
7.3.250.0090.00916.40
7.3.240.0040.01516.49
7.3.230.0090.00916.39
7.3.210.0070.01016.49
7.3.200.0070.01019.39
7.3.190.0030.01216.45
7.3.180.0080.00816.45
7.3.170.0110.00716.41
7.3.160.0060.01316.38
7.2.330.0060.01316.79
7.2.320.0070.01616.29
7.2.310.0030.01316.63
7.2.300.0100.00616.71
7.2.290.0080.00816.45
7.2.80.0030.01016.63
7.2.60.0000.01516.73
7.2.00.0040.01319.53
7.1.200.0000.01515.88
7.1.100.0070.01018.03
7.1.70.0000.02117.12
7.1.60.0170.00719.40
7.1.50.0140.01116.61
7.1.00.0170.06322.33
7.0.200.0710.00414.62
7.0.60.0170.07721.67
7.0.50.0070.06717.72
7.0.40.0070.08020.23
7.0.30.0270.08720.30
7.0.20.0400.07020.10
7.0.10.0030.09320.22
7.0.00.0070.06320.06
5.6.210.0130.07320.65
5.6.200.0070.06318.19
5.6.190.0070.08020.58
5.6.180.0200.04720.50
5.6.170.0230.03320.57
5.6.160.0000.04720.54
5.6.150.0030.05718.19
5.6.140.0030.06018.19
5.6.130.0000.04318.21
5.6.120.0200.07020.97
5.6.110.0030.09020.98
5.6.100.0070.08321.11
5.6.90.0000.08021.10
5.6.80.0100.06320.44
5.5.350.0070.06020.46
5.5.340.0030.05017.99
5.5.330.0070.09020.25
5.5.320.0500.06720.28
5.5.310.0330.07020.45
5.5.300.0000.05317.96
5.5.290.0170.07317.97
5.5.280.0100.04020.80
5.5.270.0100.08320.88
5.5.260.0070.06720.77
5.5.250.0030.08320.70
5.5.240.0200.08320.29

preferences:
50.71 ms | 401 KiB | 5 Q