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) { var_dump($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.0040.01116.88
8.3.50.0120.00821.26
8.3.40.0040.01218.59
8.3.30.0110.00418.88
8.3.20.0070.00020.25
8.3.10.0080.00023.57
8.3.00.0030.00521.73
8.2.180.0160.00316.63
8.2.170.0070.00722.96
8.2.160.0080.00620.38
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00821.07
8.2.120.0040.00426.35
8.2.110.0030.00720.90
8.2.100.0090.00318.00
8.2.90.0050.00319.17
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0030.00618.04
8.2.50.0040.00418.09
8.2.40.0000.00822.27
8.2.30.0040.00419.57
8.2.20.0040.00417.73
8.2.10.0040.00418.13
8.2.00.0020.00518.10
8.1.280.0110.00725.92
8.1.270.0160.00322.24
8.1.260.0000.00828.09
8.1.250.0070.00028.09
8.1.240.0060.00324.06
8.1.230.0060.00617.83
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0040.00417.48
8.1.190.0030.00517.25
8.1.180.0030.00618.10
8.1.170.0060.00318.50
8.1.160.0030.00620.66
8.1.150.0070.00018.93
8.1.140.0040.00419.58
8.1.130.0030.00317.66
8.1.120.0000.00717.40
8.1.110.0040.00417.50
8.1.100.0050.00317.42
8.1.90.0000.00817.50
8.1.80.0040.00717.34
8.1.70.0030.00317.50
8.1.60.0000.00817.47
8.1.50.0040.00417.48
8.1.40.0050.00317.51
8.1.30.0040.00417.59
8.1.20.0080.00017.62
8.1.10.0040.00417.59
8.1.00.0000.00817.52
8.0.300.0080.00018.84
8.0.290.0040.00416.73
8.0.280.0040.00418.46
8.0.270.0040.00417.17
8.0.260.0000.00717.16
8.0.250.0070.00017.07
8.0.240.0040.00417.04
8.0.230.0070.00016.97
8.0.220.0000.00716.97
8.0.210.0080.00016.82
8.0.200.0000.00717.07
8.0.190.0070.00016.93
8.0.180.0090.00016.98
8.0.170.0080.00016.96
8.0.160.0050.00516.96
8.0.150.0000.00716.84
8.0.140.0050.00216.81
8.0.130.0030.00313.35
8.0.120.0040.00416.97
8.0.110.0000.00816.96
8.0.100.0040.00416.85
8.0.90.0030.00517.02
8.0.80.0090.01216.98
8.0.70.0030.00516.96
8.0.60.0000.00716.78
8.0.50.0020.00516.91
8.0.30.0150.00317.02
8.0.20.0060.01617.40
8.0.10.0000.00717.19
8.0.00.0130.00616.80
7.4.330.0050.00016.73
7.4.320.0030.00316.61
7.4.300.0030.00316.45
7.4.290.0100.00016.49
7.4.280.0040.00416.35
7.4.270.0030.00316.36
7.4.260.0070.00016.48
7.4.250.0000.00816.45
7.4.240.0000.00716.61
7.4.230.0030.00316.70
7.4.220.0180.00016.71
7.4.210.0100.00616.64
7.4.200.0000.00816.50
7.4.160.0030.01216.61
7.4.150.0110.01117.40
7.4.140.0080.01417.86
7.4.130.0180.00816.40
7.4.120.0100.00716.50
7.4.110.0150.00916.34
7.4.100.0030.01416.35
7.4.90.0070.01016.39
7.4.80.0110.00719.39
7.4.70.0130.00316.48
7.4.60.0120.00616.52
7.4.50.0080.01116.20
7.4.40.0130.01316.56
7.4.30.0180.00016.61
7.4.10.0030.01214.99
7.4.00.0080.00714.94
7.3.330.0040.00413.32
7.3.320.0030.00313.22
7.3.310.0000.00716.29
7.3.300.0030.00316.21
7.3.290.0090.01116.30
7.3.280.0080.01116.25
7.3.270.0150.00317.40
7.3.260.0160.01016.45
7.3.250.0110.00716.36
7.3.240.0140.00716.50
7.3.230.0100.01016.39
7.3.210.0080.00816.21
7.3.200.0150.00419.39
7.3.190.0160.00616.17
7.3.180.0140.00716.23
7.3.170.0150.00616.46
7.3.160.0040.01216.41
7.3.130.0060.01314.85
7.3.120.0070.01014.90
7.3.110.0070.00814.88
7.3.100.0070.00714.66
7.3.90.0050.00914.87
7.3.80.0070.00714.80
7.3.70.0050.00814.70
7.3.60.0090.00614.75
7.3.50.0100.00614.79
7.3.40.0100.00414.66
7.3.30.0030.00914.79
7.3.20.0080.00816.49
7.3.10.0060.01016.52
7.3.00.0080.00616.52
7.2.330.0040.01516.70
7.2.320.0170.01016.51
7.2.310.0120.00916.48
7.2.300.0040.01316.57
7.2.290.0070.01016.66
7.2.260.0040.01515.11
7.2.250.0100.00614.96
7.2.240.0070.00915.05
7.2.230.0040.01115.04
7.2.220.0050.00915.12
7.2.210.0070.00815.05
7.2.200.0070.00714.97
7.2.190.0070.00714.94
7.2.180.0090.00814.88
7.2.170.0080.00615.09
7.2.160.0040.01014.84
7.2.150.0020.01116.80
7.2.140.0060.00816.82
7.2.130.0110.00516.92
7.2.120.0090.00716.70
7.2.110.0070.01016.85
7.2.100.0070.00816.84
7.2.90.0060.01016.97
7.2.80.0100.00716.88
7.2.70.0080.00816.94
7.2.60.0040.01116.87
7.2.50.0080.00716.80
7.2.40.0100.00616.84
7.2.30.0080.00916.95
7.2.20.0080.00516.81
7.2.10.0090.00816.93
7.2.00.0090.00817.52
7.1.330.0070.00715.80
7.1.320.0020.00915.87
7.1.310.0070.00815.67
7.1.300.0080.00715.81
7.1.290.0060.00815.89
7.1.280.0070.00915.76
7.1.270.0030.01115.69
7.1.260.0070.00615.66
7.1.250.0080.00715.65
7.1.240.0090.00315.52
7.1.230.0100.00715.46
7.1.220.0040.01115.57
7.1.210.0070.00715.59
7.1.200.0050.01015.72
7.1.190.0070.00715.60
7.1.180.0060.00315.95
7.1.170.0070.00715.68
7.1.160.0110.00415.85
7.1.150.0000.01416.01
7.1.140.0100.00615.82
7.1.130.0030.00715.82
7.1.120.0070.00715.82
7.1.110.0040.00715.87
7.1.100.0050.00516.87
7.1.90.0080.00315.79
7.1.80.0000.01316.00
7.1.70.0050.00616.37
7.1.60.0130.00417.62
7.1.50.0070.01316.38
7.1.40.0040.00715.68
7.1.30.0030.01415.89
7.1.20.0070.00716.00
7.1.10.0060.01015.95
7.1.00.0070.03819.08
7.0.330.0120.00415.42
7.0.320.0090.00615.49
7.0.310.0130.00015.37
7.0.300.0060.00615.04
7.0.290.0100.00715.14
7.0.280.0070.01015.46
7.0.270.0080.00615.42
7.0.260.0070.00715.37
7.0.250.0080.00315.57
7.0.240.0030.00915.47
7.0.230.0080.00415.47
7.0.220.0030.01015.16
7.0.210.0060.00615.53
7.0.200.0230.00915.00
7.0.190.0060.00615.57
7.0.180.0040.00815.47
7.0.170.0040.00415.56
7.0.160.0070.00415.39
7.0.150.0030.00615.33
7.0.140.0060.00315.40
7.0.130.0050.00515.37
7.0.120.0120.00315.58
7.0.110.0030.00715.30
7.0.100.0110.00315.48
7.0.90.0000.01215.30
7.0.80.0040.00415.43
7.0.70.0070.00715.42
7.0.60.0110.03318.63
7.0.50.0070.04116.80
7.0.40.0060.02816.93
7.0.30.0180.04116.82
7.0.20.0130.03016.87
7.0.10.0100.04016.87
7.0.00.0080.04216.90
5.6.400.0090.00614.48
5.6.390.0000.01814.51
5.6.380.0030.00914.36
5.6.370.0090.00613.96
5.6.360.0060.00614.39
5.6.350.0000.01214.33
5.6.340.0120.00314.29
5.6.330.0090.00014.50
5.6.320.0030.01014.60
5.6.310.0110.00014.23
5.6.300.0040.01214.57
5.6.290.0090.00314.56
5.6.280.0070.02217.52
5.6.270.0000.01614.41
5.6.260.0100.00014.28
5.6.250.0040.00714.27
5.6.240.0100.00714.12
5.6.230.0060.00914.26
5.6.220.0080.00414.12
5.6.210.0020.04317.41
5.6.200.0060.04016.19
5.6.190.0120.04817.48
5.6.180.0150.03517.43
5.6.170.0080.02817.31
5.6.160.0020.03717.42
5.6.150.0060.02816.24
5.6.140.0100.04316.24
5.6.130.0070.02216.11
5.6.120.0060.03817.71
5.6.110.0070.04317.63
5.6.100.0080.04417.59
5.6.90.0120.04017.56
5.6.80.0070.03917.17
5.6.70.0060.00614.05
5.6.60.0000.01414.33
5.6.50.0060.00614.34
5.6.40.0090.00614.32
5.6.30.0030.01014.29
5.6.20.0070.01014.29
5.6.10.0040.01114.27
5.6.00.0030.01014.01
5.5.380.0030.00614.44
5.5.370.0100.00714.27
5.5.360.0040.00814.12
5.5.350.0120.04017.32
5.5.340.0130.03716.28
5.5.330.0080.04517.22
5.5.320.0220.03517.36
5.5.310.0200.04217.05
5.5.300.0070.04516.19
5.5.290.0100.04216.20
5.5.280.0100.02417.65
5.5.270.0100.04017.37
5.5.260.0100.03417.35
5.5.250.0070.03517.41
5.5.240.0150.04217.17
5.5.230.0130.00014.38
5.5.220.0090.00614.09
5.5.210.0090.00614.03
5.5.200.0030.01014.50
5.5.190.0000.00914.24
5.5.180.0030.00614.52
5.5.170.0150.00014.27
5.5.160.0060.00914.13
5.5.150.0000.00914.44
5.5.140.0060.00913.95
5.5.130.0060.00913.99
5.5.120.0060.00614.23
5.5.110.0100.00714.18
5.5.100.0100.01014.31
5.5.90.0000.01514.21
5.5.80.0090.00614.22
5.5.70.0060.01214.22
5.5.60.0000.01214.04
5.5.50.0060.00314.40
5.5.40.0140.00014.43
5.5.30.0000.01314.14
5.5.20.0140.00413.96
5.5.10.0060.00614.03
5.5.00.0130.00314.30

preferences:
57.45 ms | 401 KiB | 5 Q