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 ('{$x}') not found."); } else {var_dump($a[$x]);} if (!isset($a[$y])) { throw new Exception("Key Y ('{$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.70.0120.00416.88
8.3.60.0110.00416.88
8.3.50.0100.00921.09
8.3.40.0110.01118.64
8.3.30.0070.00718.63
8.3.20.0060.00320.34
8.3.10.0080.00023.66
8.3.00.0060.00321.91
8.2.190.0070.01016.93
8.2.180.0160.00318.41
8.2.170.0040.01122.96
8.2.160.0100.00320.35
8.2.150.0090.00024.18
8.2.140.0070.00024.66
8.2.130.0030.00521.03
8.2.120.0080.00026.35
8.2.110.0090.00019.16
8.2.100.0040.00717.91
8.2.90.0000.00819.17
8.2.80.0000.00817.97
8.2.70.0050.00317.50
8.2.60.0040.00418.05
8.2.50.0030.00518.10
8.2.40.0040.00422.27
8.2.30.0070.00019.56
8.2.20.0040.00417.62
8.2.10.0040.00418.19
8.2.00.0000.00718.18
8.1.280.0120.00325.92
8.1.270.0070.00024.66
8.1.260.0050.00528.09
8.1.250.0000.00828.09
8.1.240.0000.00923.96
8.1.230.0130.00019.58
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00617.25
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0040.00418.56
8.1.160.0040.00420.68
8.1.150.0040.00419.01
8.1.140.0040.00419.53
8.1.130.0040.00417.70
8.1.120.0040.00417.38
8.1.110.0050.00317.51
8.1.100.0040.00417.46
8.1.90.0000.00717.48
8.1.80.0000.00817.49
8.1.70.0030.00317.49
8.1.60.0080.00017.63
8.1.50.0050.00317.50
8.1.40.0040.00417.57
8.1.30.0030.00517.57
8.1.20.0000.00717.63
8.1.10.0000.00717.63
8.1.00.0030.00617.48
8.0.300.0070.00018.77
8.0.290.0070.00016.63
8.0.280.0000.00818.50
8.0.270.0030.00317.30
8.0.260.0040.00417.27
8.0.250.0000.00717.03
8.0.240.0030.00617.00
8.0.230.0050.00216.95
8.0.220.0000.00716.88
8.0.210.0030.00516.93
8.0.200.0030.00317.02
8.0.190.0040.00417.08
8.0.180.0070.00016.87
8.0.170.0050.00217.00
8.0.160.0040.00816.96
8.0.150.0060.00316.95
8.0.140.0030.00516.91
8.0.130.0000.00513.41
8.0.120.0040.00416.78
8.0.110.0050.00216.86
8.0.100.0000.00716.82
8.0.90.0000.00716.92
8.0.80.0090.00616.88
8.0.70.0050.00316.86
8.0.60.0040.00417.07
8.0.50.0070.00016.94
8.0.30.0100.00717.03
8.0.20.0100.00917.40
8.0.10.0070.00017.00
8.0.00.0040.01516.84
7.4.330.0020.00216.81
7.4.320.0030.00316.50
7.4.300.0080.00016.59
7.4.290.0000.00816.55
7.4.280.0000.00716.52
7.4.270.0000.00716.59
7.4.260.0040.00416.55
7.4.250.0000.00816.46
7.4.240.0040.00416.50
7.4.230.0070.00016.55
7.4.220.0030.01416.38
7.4.210.0070.01116.50
7.4.200.0040.00416.27
7.4.160.0090.00916.42
7.4.150.0060.01217.40
7.4.140.0210.00817.86
7.4.130.0120.00616.62
7.4.120.0130.00816.42
7.4.110.0100.00716.49
7.4.100.0070.01116.59
7.4.90.0100.00716.48
7.4.80.0060.01119.39
7.4.70.0040.01216.51
7.4.60.0090.00916.52
7.4.50.0030.01016.50
7.4.40.0140.00716.38
7.4.30.0180.00016.35
7.4.00.0060.01014.90
7.3.330.0100.00013.15
7.3.320.0000.00513.22
7.3.310.0030.00316.33
7.3.300.0000.00716.34
7.3.290.0070.00816.37
7.3.280.0110.00316.28
7.3.270.0060.01117.40
7.3.260.0110.01116.28
7.3.250.0110.00716.41
7.3.240.0110.00716.34
7.3.230.0060.01616.39
7.3.210.0090.00916.53
7.3.200.0110.00816.37
7.3.190.0080.00816.61
7.3.180.0060.00916.43
7.3.170.0070.01016.49
7.3.160.0000.01616.60
7.3.120.0060.01114.94
7.3.110.0050.01114.86
7.3.100.0100.00614.82
7.3.90.0070.00514.75
7.3.80.0080.00614.77
7.3.70.0060.00614.77
7.3.60.0040.00814.80
7.3.50.0060.00714.82
7.3.40.0080.00314.85
7.3.30.0060.00814.78
7.3.20.0060.00716.67
7.3.10.0050.00816.70
7.3.00.0060.00916.67
7.2.330.0090.01216.77
7.2.320.0100.01016.58
7.2.310.0080.00816.55
7.2.300.0060.01116.45
7.2.290.0130.00316.58
7.2.250.0060.01114.99
7.2.240.0070.01015.19
7.2.230.0030.01214.99
7.2.220.0040.00815.21
7.2.210.0050.00814.99
7.2.200.0060.00815.15
7.2.190.0080.00614.86
7.2.180.0040.01015.09
7.2.170.0050.00914.99
7.2.160.0030.01315.03
7.2.150.0020.01316.87
7.2.140.0030.01016.91
7.2.130.0070.00816.91
7.2.120.0100.00516.94
7.2.110.0090.00516.85
7.2.100.0100.00516.77
7.2.90.0070.01216.95
7.2.80.0080.01016.76
7.2.70.0030.01416.78
7.2.60.0070.01016.87
7.2.50.0060.00916.84
7.2.40.0070.01117.08
7.2.30.0110.00217.02
7.2.20.0050.01016.78
7.2.10.0110.00516.94
7.2.00.0050.01117.67
7.1.330.0040.01315.73
7.1.320.0030.00815.67
7.1.310.0070.00715.68
7.1.300.0080.00615.69
7.1.290.0070.00715.59
7.1.280.0050.00815.52
7.1.270.0080.00915.71
7.1.260.0060.00415.81
7.1.250.0030.01215.77
7.1.240.0080.00315.91
7.1.230.0030.01215.54
7.1.220.0090.00615.78
7.1.210.0070.00715.88
7.1.200.0060.00715.76
7.1.190.0060.00315.80
7.1.180.0070.00715.78
7.1.170.0100.00715.75
7.1.160.0000.01815.96
7.1.150.0090.00315.74
7.1.140.0100.00015.70
7.1.130.0070.01015.92
7.1.120.0030.00615.65
7.1.110.0080.00015.68
7.1.100.0030.00915.87
7.1.90.0090.00315.51
7.1.80.0030.00715.91
7.1.70.0040.00716.53
7.1.60.0070.00516.30
7.1.50.0050.01216.08
7.1.40.0030.01015.55
7.1.30.0070.00715.81
7.1.20.0100.00715.76
7.1.10.0030.01015.73
7.1.00.0050.04319.02
7.0.330.0120.00015.36
7.0.320.0100.00315.49
7.0.310.0070.01015.53
7.0.300.0120.00615.45
7.0.290.0040.00715.39
7.0.280.0070.00715.17
7.0.270.0030.01315.39
7.0.260.0030.01015.40
7.0.250.0030.01215.43
7.0.240.0070.00715.37
7.0.230.0000.01515.21
7.0.220.0040.00815.39
7.0.210.0030.00615.41
7.0.200.0010.01216.18
7.0.190.0000.01515.31
7.0.180.0060.00915.55
7.0.170.0000.00815.27
7.0.160.0100.00715.58
7.0.150.0070.00415.41
7.0.140.0070.00715.55
7.0.130.0000.01515.57
7.0.120.0100.00315.27
7.0.110.0030.00715.24
7.0.100.0070.01015.41
7.0.90.0030.01015.46
7.0.80.0030.01015.34
7.0.70.0000.00815.37
7.0.60.0130.04318.54
7.0.50.0050.02716.65
7.0.40.0050.05116.84
7.0.30.0120.04216.88
7.0.20.0200.04316.91
7.0.10.0130.02416.87
7.0.00.0080.04216.88
5.6.400.0030.01314.46
5.6.390.0040.01114.35
5.6.380.0060.00614.47
5.6.370.0070.00714.45
5.6.360.0060.01214.00
5.6.350.0030.01214.36
5.6.340.0080.00414.63
5.6.330.0030.01314.29
5.6.320.0030.00914.00
5.6.310.0030.01014.33
5.6.300.0060.00614.44
5.6.290.0070.00714.04
5.6.280.0100.03717.82
5.6.270.0030.00714.27
5.6.260.0030.01014.34
5.6.250.0040.00414.33
5.6.240.0030.01014.16
5.6.230.0060.00614.43
5.6.220.0000.01114.10
5.6.210.0080.03417.51
5.6.200.0070.04616.32
5.6.190.0070.04717.36
5.6.180.0100.03917.40
5.6.170.0150.03317.45
5.6.160.0060.04517.53
5.6.150.0050.04316.37
5.6.140.0100.04016.21
5.6.130.0100.04416.33
5.6.120.0050.04217.72
5.6.110.0050.03017.67
5.6.100.0080.04617.73
5.6.90.0090.03517.48
5.6.80.0080.02917.33
5.6.70.0030.00514.32
5.6.60.0000.01414.35
5.6.50.0030.00714.25
5.6.40.0080.00314.28
5.6.30.0060.00614.04
5.6.20.0070.00714.19
5.6.10.0090.00614.16
5.6.00.0040.00814.11
5.5.380.0000.01114.32
5.5.370.0040.01114.48
5.5.360.0100.00314.43
5.5.350.0050.04317.42
5.5.340.0070.03816.04
5.5.330.0080.02417.05
5.5.320.0130.02317.47
5.5.310.0250.03617.28
5.5.300.0080.04316.13
5.5.290.0050.04316.10
5.5.280.0050.02117.47
5.5.270.0050.02717.66
5.5.260.0100.03717.60
5.5.250.0140.04117.29
5.5.240.0080.02317.20
5.5.230.0060.00913.99
5.5.220.0000.01314.28
5.5.210.0070.00714.44
5.5.200.0030.01314.14
5.5.190.0070.01114.28
5.5.180.0000.00814.23
5.5.170.0120.00314.55
5.5.160.0030.00914.38
5.5.150.0100.00013.89
5.5.140.0130.00014.33
5.5.130.0040.00813.80
5.5.120.0070.01014.22
5.5.110.0110.00014.38
5.5.100.0100.00313.91
5.5.90.0130.00014.29
5.5.80.0070.00713.76
5.5.70.0030.01014.24
5.5.60.0040.00814.04
5.5.50.0070.00313.94
5.5.40.0000.01514.24
5.5.30.0040.00414.20
5.5.20.0030.00614.01
5.5.10.0030.00614.07
5.5.00.0030.01014.11

preferences:
48.22 ms | 401 KiB | 5 Q