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[$x]); // 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.0110.00417.00
8.3.50.0120.00316.39
8.3.40.0030.01218.63
8.3.30.0110.00418.70
8.3.20.0030.00620.29
8.3.10.0080.00023.66
8.3.00.0050.00521.52
8.2.180.0040.01117.00
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0040.00421.00
8.2.120.0040.00426.35
8.2.110.0070.00419.04
8.2.100.0110.00017.91
8.2.90.0040.00419.34
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0000.00817.80
8.2.50.0030.00518.10
8.2.40.0080.00022.04
8.2.30.0000.00719.38
8.2.20.0030.00517.69
8.2.10.0030.00518.04
8.2.00.0000.00718.12
8.1.280.0150.00425.92
8.1.270.0180.00022.05
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0000.00823.97
8.1.230.0040.01117.68
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0000.00817.35
8.1.190.0050.00317.36
8.1.180.0030.00518.10
8.1.170.0000.00918.56
8.1.160.0000.00720.76
8.1.150.0000.00719.02
8.1.140.0040.00419.58
8.1.130.0000.00717.70
8.1.120.0040.00417.38
8.1.110.0050.00317.42
8.1.100.0040.00417.43
8.1.90.0000.00717.49
8.1.80.0060.00317.37
8.1.70.0050.00217.44
8.1.60.0040.00417.63
8.1.50.0040.00417.38
8.1.40.0030.00617.52
8.1.30.0040.00417.64
8.1.20.0000.00717.48
8.1.10.0040.00417.52
8.1.00.0040.00417.52
8.0.300.0080.00018.77
8.0.290.0040.00416.88
8.0.280.0070.00018.51
8.0.270.0030.00317.13
8.0.260.0040.00417.24
8.0.250.0070.00016.96
8.0.240.0000.00717.01
8.0.230.0030.00517.00
8.0.220.0000.00616.79
8.0.210.0030.00416.97
8.0.200.0060.00017.02
8.0.190.0000.00816.93
8.0.180.0040.00417.00
8.0.170.0000.00816.97
8.0.160.0070.00416.95
8.0.150.0040.00416.98
8.0.140.0000.00716.89
8.0.130.0000.00513.42
8.0.120.0000.00816.93
8.0.110.0050.00316.92
8.0.100.0040.00417.00
8.0.90.0040.00416.95
8.0.80.0090.00816.92
8.0.70.0000.00816.80
8.0.60.0000.00716.96
8.0.50.0070.00017.03
8.0.30.0090.01317.21
8.0.20.0090.01117.40
8.0.10.0040.00416.96
8.0.00.0070.01116.65
7.4.330.0000.00616.85
7.4.320.0030.00316.63
7.4.300.0050.00316.52
7.4.290.0040.00716.61
7.4.280.0030.00616.64
7.4.270.0000.00716.43
7.4.260.0000.00716.41
7.4.250.0070.00016.57
7.4.240.0030.00316.41
7.4.230.0000.00716.38
7.4.220.0100.01016.58
7.4.210.0100.00716.58
7.4.200.0030.00516.58
7.4.160.0030.01316.46
7.4.150.0120.00617.40
7.4.140.0140.01017.86
7.4.130.0130.00516.50
7.4.120.0100.00716.44
7.4.110.0060.01116.48
7.4.100.0070.01016.62
7.4.90.0110.00616.44
7.4.80.0130.01019.39
7.4.70.0060.00916.43
7.4.60.0060.01016.37
7.4.50.0090.00616.23
7.4.40.0090.01316.66
7.4.30.0110.00616.52
7.4.10.0040.01415.02
7.4.00.0070.00914.95
7.3.330.0050.00313.36
7.3.320.0000.00513.16
7.3.310.0000.00716.27
7.3.300.0030.00316.34
7.3.290.0030.01316.28
7.3.280.0120.00616.27
7.3.270.0100.01017.40
7.3.260.0130.01016.60
7.3.250.0110.00616.30
7.3.240.0110.00716.30
7.3.230.0040.01216.45
7.3.210.0060.01116.28
7.3.200.0040.01219.39
7.3.190.0030.01316.47
7.3.180.0130.00716.52
7.3.170.0100.00716.45
7.3.160.0060.00916.57
7.3.130.0090.00914.70
7.3.120.0090.00914.89
7.3.110.0060.01314.97
7.3.100.0060.00614.77
7.3.90.0040.01114.46
7.3.80.0000.01514.79
7.3.70.0070.00714.61
7.3.60.0000.00814.67
7.3.50.0000.00914.88
7.3.40.0060.00714.93
7.3.30.0030.01314.75
7.3.20.0040.00416.68
7.3.10.0040.00716.54
7.3.00.0030.00716.67
7.2.330.0140.00916.56
7.2.320.0150.00616.82
7.2.310.0060.01216.75
7.2.300.0080.00816.79
7.2.290.0060.01216.52
7.2.260.0090.00314.98
7.2.250.0070.01114.80
7.2.240.0060.00615.17
7.2.230.0070.01015.14
7.2.220.0000.01615.00
7.2.210.0070.00714.65
7.2.200.0030.00615.25
7.2.190.0000.01514.82
7.2.180.0000.01014.83
7.2.170.0070.00415.20
7.2.160.0090.00615.02
7.2.150.0000.01316.82
7.2.140.0070.00717.03
7.2.130.0040.00816.85
7.2.120.0060.01016.95
7.2.110.0030.00817.06
7.2.100.0000.01216.86
7.2.90.0070.00716.89
7.2.80.0070.00716.86
7.2.70.0110.00316.58
7.2.60.0050.00916.98
7.2.50.0000.01017.11
7.2.40.0070.00716.86
7.2.30.0030.01516.87
7.2.20.0100.00616.98
7.2.10.0050.01017.16
7.2.00.0110.00818.07
7.1.330.0060.00615.73
7.1.320.0030.01315.67
7.1.310.0030.01215.86
7.1.300.0100.00315.73
7.1.290.0070.00715.80
7.1.280.0070.01015.88
7.1.270.0060.00915.72
7.1.260.0000.01015.76
7.1.250.0090.00615.56
7.1.240.0000.00815.96
7.1.230.0100.00315.39
7.1.220.0040.01115.42
7.1.210.0030.00915.77
7.1.200.0050.00915.67
7.1.190.0000.01215.51
7.1.180.0110.00015.94
7.1.170.0080.00415.42
7.1.160.0030.01015.57
7.1.150.0080.01215.87
7.1.140.0060.01115.61
7.1.130.0110.00315.71
7.1.120.0080.01315.87
7.1.110.0070.01015.83
7.1.100.0050.00916.87
7.1.90.0030.00615.57
7.1.80.0000.01415.85
7.1.70.0070.00616.39
7.1.60.0070.01117.59
7.1.50.0050.01416.40
7.1.40.0040.00415.75
7.1.30.0070.01015.96
7.1.20.0060.00915.71
7.1.10.0080.00415.70
7.1.00.0070.04018.91
7.0.330.0090.00315.38
7.0.320.0040.00715.37
7.0.310.0070.00715.36
7.0.300.0100.00015.22
7.0.290.0040.00415.21
7.0.280.0030.01015.37
7.0.270.0030.00915.29
7.0.260.0070.00715.41
7.0.250.0030.01015.44
7.0.240.0030.01015.39
7.0.230.0090.00615.43
7.0.220.0130.00015.21
7.0.210.0070.00715.38
7.0.200.0210.00614.77
7.0.190.0090.00615.08
7.0.180.0000.00815.28
7.0.170.0070.01015.38
7.0.160.0090.00615.32
7.0.150.0030.01015.11
7.0.140.0040.00715.43
7.0.130.0060.00915.47
7.0.120.0060.00315.32
7.0.110.0070.00715.21
7.0.100.0030.00515.16
7.0.90.0000.01415.35
7.0.80.0030.00915.34
7.0.70.0060.00315.36
7.0.60.0100.04218.61
7.0.50.0030.04716.80
7.0.40.0080.04516.74
7.0.30.0180.03816.80
7.0.20.0150.03816.80
7.0.10.0030.05016.90
7.0.00.0060.04216.84
5.6.400.0080.00314.02
5.6.390.0000.01013.91
5.6.380.0000.01314.12
5.6.370.0100.00014.44
5.6.360.0040.00814.42
5.6.350.0070.00314.36
5.6.340.0060.01214.11
5.6.330.0120.00414.13
5.6.320.0000.01114.18
5.6.310.0110.00014.16
5.6.300.0050.00314.36
5.6.290.0190.00014.11
5.6.280.0030.03717.72
5.6.270.0060.00914.18
5.6.260.0100.00314.21
5.6.250.0100.00714.29
5.6.240.0030.01214.39
5.6.230.0120.00014.33
5.6.220.0070.00714.21
5.6.210.0090.02617.27
5.6.200.0130.04116.12
5.6.190.0100.04217.42
5.6.180.0130.02317.31
5.6.170.0150.02617.34
5.6.160.0080.04117.47
5.6.150.0050.02316.11
5.6.140.0070.04216.32
5.6.130.0050.04616.19
5.6.120.0070.02817.72
5.6.110.0070.04517.72
5.6.100.0170.03717.76
5.6.90.0080.04017.75
5.6.80.0020.02617.43
5.6.70.0130.00314.20
5.6.60.0060.00614.02
5.6.50.0030.01014.07
5.6.40.0070.00714.25
5.6.30.0120.00614.23
5.6.20.0120.00014.23
5.6.10.0060.00913.88
5.6.00.0030.00514.57
5.5.380.0030.01114.02
5.5.370.0030.01214.01
5.5.360.0080.00513.89
5.5.350.0100.03817.13
5.5.340.0040.04615.91
5.5.330.0030.04017.10
5.5.320.0250.02717.19
5.5.310.0140.03017.13
5.5.300.0080.04416.02
5.5.290.0030.03716.09
5.5.280.0030.02317.22
5.5.270.0100.03917.32
5.5.260.0070.03017.41
5.5.250.0060.02617.14
5.5.240.0190.03817.07
5.5.230.0000.00813.66
5.5.220.0000.00813.74
5.5.210.0080.00413.61
5.5.200.0130.00313.52
5.5.190.0040.00714.05
5.5.180.0040.00714.37
5.5.170.0080.00414.10
5.5.160.0080.00014.13
5.5.150.0040.01214.32
5.5.140.0060.00614.17
5.5.130.0070.00714.24
5.5.120.0000.01614.34
5.5.110.0050.00514.15
5.5.100.0090.00014.13
5.5.90.0100.00314.29
5.5.80.0070.01014.04
5.5.70.0040.00414.21
5.5.60.0030.01014.04
5.5.50.0070.00714.28
5.5.40.0000.01014.34
5.5.30.0120.00614.15
5.5.20.0070.01114.27
5.5.10.0100.00713.67
5.5.00.0040.01214.18

preferences:
48.27 ms | 401 KiB | 5 Q