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) { echo $a[$x], PHP_EOL; // 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.0090.00616.75
8.3.50.0110.01021.15
8.3.40.0070.01418.92
8.3.30.0070.00718.67
8.3.20.0080.00020.26
8.3.10.0000.00823.56
8.3.00.0080.00021.73
8.2.180.0150.00016.47
8.2.170.0080.00822.96
8.2.160.0140.00020.38
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00421.07
8.2.120.0040.00426.35
8.2.110.0050.00521.03
8.2.100.0080.00317.78
8.2.90.0030.00618.22
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0000.00717.93
8.2.50.0040.00418.10
8.2.40.0090.00022.27
8.2.30.0030.00519.57
8.2.20.0000.00717.74
8.2.10.0040.00418.19
8.2.00.0000.00818.00
8.1.280.0160.00025.92
8.1.270.0050.00322.03
8.1.260.0050.00228.09
8.1.250.0080.00028.09
8.1.240.0070.00323.80
8.1.230.0080.00420.98
8.1.220.0000.00817.91
8.1.210.0080.00018.77
8.1.200.0110.00017.25
8.1.190.0050.00317.22
8.1.180.0090.00018.10
8.1.170.0040.00418.46
8.1.160.0040.00420.64
8.1.150.0000.00719.06
8.1.140.0040.00419.63
8.1.130.0000.00717.58
8.1.120.0000.00717.40
8.1.110.0070.00017.32
8.1.100.0000.00717.41
8.1.90.0080.00017.39
8.1.80.0000.01017.50
8.1.70.0080.00017.36
8.1.60.0000.00817.50
8.1.50.0040.00417.42
8.1.40.0060.00317.39
8.1.30.0030.00517.62
8.1.20.0040.00417.58
8.1.10.0030.00517.57
8.1.00.0080.00017.40
8.0.300.0040.00419.98
8.0.290.0060.00316.88
8.0.280.0080.00018.45
8.0.270.0050.00217.27
8.0.260.0070.00017.19
8.0.250.0000.00817.02
8.0.240.0040.00417.03
8.0.230.0000.00717.04
8.0.220.0040.00416.93
8.0.210.0040.00416.86
8.0.200.0030.00316.98
8.0.190.0040.00416.98
8.0.180.0000.00717.03
8.0.170.0040.00416.97
8.0.160.0030.00716.97
8.0.150.0030.00716.88
8.0.140.0000.00716.85
8.0.130.0000.00513.38
8.0.120.0050.00316.85
8.0.110.0040.00416.86
8.0.100.0040.00416.90
8.0.90.0040.00416.79
8.0.80.0100.00616.97
8.0.70.0040.00416.85
8.0.60.0040.00416.90
8.0.50.0040.00416.90
8.0.30.0120.00717.17
8.0.20.0110.00817.40
8.0.10.0070.00016.96
8.0.00.0100.00816.86
7.4.330.0000.00516.77
7.4.320.0000.00616.61
7.4.300.0030.00316.50
7.4.290.0040.00416.48
7.4.280.0030.00616.61
7.4.270.0070.00016.54
7.4.260.0040.00716.43
7.4.250.0040.00416.46
7.4.240.0000.00716.53
7.4.230.0000.00716.68
7.4.220.0060.01216.69
7.4.210.0070.01116.62
7.4.200.0030.00316.59
7.4.160.0140.00316.36
7.4.150.0140.00317.40
7.4.140.0060.01317.86
7.4.130.0070.00916.58
7.4.120.0100.00716.65
7.4.110.0190.00316.80
7.4.100.0070.01716.48
7.4.90.0160.00616.67
7.4.80.0180.00619.39
7.4.70.0100.00716.62
7.4.60.0100.00916.53
7.4.50.0070.00716.74
7.4.40.0070.01016.25
7.4.30.0090.00916.42
7.4.00.0040.01115.10
7.3.330.0030.00313.43
7.3.320.0030.00213.19
7.3.310.0030.00316.46
7.3.300.0070.00016.36
7.3.290.0080.01016.30
7.3.280.0100.01016.35
7.3.270.0160.00317.40
7.3.260.0070.01116.42
7.3.250.0110.00516.47
7.3.240.0100.01016.49
7.3.230.0110.00816.58
7.3.210.0060.01016.40
7.3.200.0090.00919.39
7.3.190.0070.01116.55
7.3.180.0040.01816.30
7.3.170.0090.00916.56
7.3.160.0090.00616.63
7.3.120.0000.01815.00
7.3.110.0070.01014.79
7.3.100.0130.00315.00
7.3.90.0080.01215.01
7.3.80.0060.00614.93
7.3.70.0100.00714.45
7.3.60.0090.00014.72
7.3.50.0000.01214.70
7.3.40.0110.00415.00
7.3.30.0000.01414.75
7.3.20.0040.00916.62
7.3.10.0070.00616.49
7.3.00.0050.00716.64
7.2.330.0150.00316.70
7.2.320.0030.01416.44
7.2.310.0130.01016.84
7.2.300.0130.00416.53
7.2.290.0000.01616.79
7.2.240.0060.01214.98
7.2.230.0100.01015.13
7.2.220.0030.01415.27
7.2.210.0080.00814.95
7.2.200.0030.01615.05
7.2.190.0030.00915.15
7.2.180.0060.00915.04
7.2.170.0070.00415.08
7.2.160.0090.00615.09
7.2.150.0060.00916.89
7.2.140.0030.01216.76
7.2.130.0070.00716.77
7.2.120.0050.00716.81
7.2.110.0060.00716.75
7.2.100.0080.00416.94
7.2.90.0050.00516.70
7.2.80.0080.00616.84
7.2.70.0050.00916.86
7.2.60.0060.00616.83
7.2.50.0040.01016.76
7.2.40.0060.00716.99
7.2.30.0020.00916.90
7.2.20.0040.01016.92
7.2.10.0040.00716.85
7.2.00.0050.00817.52
7.1.330.0100.01015.84
7.1.320.0040.01516.02
7.1.310.0090.00615.84
7.1.300.0040.00715.78
7.1.290.0030.01015.46
7.1.280.0000.01115.77
7.1.270.0000.01315.81
7.1.260.0060.00615.65
7.1.250.0020.01015.83
7.1.200.0060.00315.55
7.1.100.0040.00817.91
7.1.70.0070.00717.27
7.1.60.0070.01719.40
7.1.50.0060.01216.61
7.1.00.0000.07722.34
7.0.200.0650.00314.35
7.0.60.0270.06321.83
7.0.50.0070.04017.84
7.0.40.0070.08720.39
7.0.30.0300.08020.29
7.0.20.0400.07320.34
7.0.10.0070.06320.07
7.0.00.0130.08020.10
5.6.280.0000.05020.89
5.6.210.0030.06020.63
5.6.200.0170.07318.29
5.6.190.0100.06020.48
5.6.180.0130.04720.41
5.6.170.0070.05020.52
5.6.160.0070.08320.46
5.6.150.0100.08018.22
5.6.140.0130.06718.23
5.6.130.0030.05318.28
5.6.120.0070.05021.00
5.6.110.0100.08321.00
5.6.100.0030.07021.04
5.6.90.0100.06720.95
5.6.80.0030.04020.40
5.5.350.0070.07720.34
5.5.340.0030.04017.98
5.5.330.0130.08020.41
5.5.320.0630.07020.36
5.5.310.0330.05720.43
5.5.300.0100.07317.92
5.5.290.0100.05717.95
5.5.280.0130.04720.68
5.5.270.0170.07720.67
5.5.260.0100.06720.89
5.5.250.0030.08720.55
5.5.240.0200.07320.16

preferences:
59.85 ms | 401 KiB | 5 Q