3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { private $a = [ 'foo-test' => [1], '-' => [2], 'bar-test' => [3] ]; private function _mySort($x, $y) { if (!isset($this->a[$x])) { throw new Exception('Missing X: "' . $x . '"'); } if (!isset($this->a[$y])) { throw new Exception('Missing Y: "' . $y . '"'); } return $x < $y; } public function __construct() { uksort($this->a, [$this, '_mySort']); } } new myClass();

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.0150.00616.63
8.3.60.0100.00718.28
8.3.50.0080.01021.11
8.3.40.0100.01018.79
8.3.30.0060.00918.71
8.3.20.0000.00720.12
8.3.10.0040.00423.59
8.3.00.0050.00321.98
8.2.180.0130.00416.50
8.2.170.0030.01022.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0030.00620.89
8.2.120.0040.00426.35
8.2.110.0030.00619.31
8.2.100.0080.00417.93
8.2.90.0080.00019.21
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0070.00018.03
8.2.50.0090.00318.09
8.2.40.0000.00822.27
8.2.30.0000.00719.43
8.2.20.0040.00417.68
8.2.10.0030.00518.21
8.2.00.0040.00418.14
8.1.280.0140.00025.92
8.1.270.0030.01622.14
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0060.00322.66
8.1.230.0110.00017.82
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.25
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0090.00318.72
8.1.160.0020.00520.70
8.1.150.0040.00419.03
8.1.140.0030.00519.60
8.1.130.0040.00417.56
8.1.120.0000.00717.48
8.1.110.0040.00417.43
8.1.100.0000.00717.46
8.1.90.0050.00317.41
8.1.80.0000.00717.46
8.1.70.0000.00717.43
8.1.60.0000.00717.45
8.1.50.0090.00017.49
8.1.40.0060.00317.48
8.1.30.0050.00317.57
8.1.20.0000.00817.63
8.1.10.0060.00317.49
8.1.00.0040.00417.32
8.0.300.0000.00818.84
8.0.290.0000.00716.75
8.0.280.0030.00318.47
8.0.270.0030.00317.28
8.0.260.0030.00317.33
8.0.250.0030.00316.98
8.0.240.0040.00417.04
8.0.230.0080.00017.00
8.0.220.0000.00716.92
8.0.210.0020.00516.86
8.0.200.0030.00316.85
8.0.190.0050.00317.00
8.0.180.0000.00716.84
8.0.170.0000.00816.80
8.0.160.0040.00416.92
8.0.150.0000.00716.88
8.0.140.0040.00316.80
8.0.130.0030.00313.32
8.0.120.0000.00816.88
8.0.110.0040.00416.89
8.0.100.0030.00516.96
8.0.90.0030.00416.91
8.0.80.0070.01116.85
8.0.70.0040.00416.88
8.0.60.0000.00716.74
8.0.50.0000.00716.81
8.0.30.0020.01317.10
8.0.20.0080.01317.40
8.0.10.0000.00717.00
8.0.00.0090.00916.83
7.4.330.0000.00516.77
7.4.320.0000.00616.36
7.4.300.0000.00716.41
7.4.290.0000.00716.53
7.4.280.0040.00416.45
7.4.270.0040.00416.54
7.4.260.0070.00016.43
7.4.250.0030.00516.51
7.4.240.0050.00216.42
7.4.230.0030.00316.63
7.4.220.0030.01516.66
7.4.210.0050.00916.45
7.4.200.0060.00316.32
7.4.160.0100.00616.46
7.4.150.0110.00717.40
7.4.140.0100.01217.86
7.4.130.0140.00816.57
7.4.120.0060.01116.48
7.4.110.0060.01216.48
7.4.100.0140.00416.38
7.4.90.0060.01216.61
7.4.80.0090.01319.39
7.4.70.0120.00316.38
7.4.60.0120.00316.38
7.4.50.0060.00616.63
7.4.40.0060.01016.36
7.4.30.0120.00616.64
7.4.00.0100.00715.04
7.3.330.0050.00213.31
7.3.320.0030.00313.15
7.3.310.0030.00316.41
7.3.300.0070.00016.31
7.3.290.0030.00316.36
7.3.280.0090.00916.29
7.3.270.0090.00917.40
7.3.260.0100.00616.44
7.3.250.0080.01016.42
7.3.240.0080.01016.32
7.3.230.0100.00716.39
7.3.210.0030.01316.54
7.3.200.0120.00919.39
7.3.190.0110.00816.57
7.3.180.0100.00716.41
7.3.170.0090.00616.27
7.3.160.0040.01216.26
7.2.330.0070.01016.80
7.2.320.0100.00716.46
7.2.310.0070.01016.77
7.2.300.0130.00316.73
7.2.290.0030.01316.58
7.2.60.0060.00616.96
7.2.00.0030.01219.51
7.1.200.0070.00415.76
7.1.100.0000.01417.95
7.1.70.0000.00917.25
7.1.60.0070.01719.40
7.1.50.0030.01317.09
7.1.00.0070.07322.44
7.0.200.0420.00414.56
7.0.60.0200.06321.59
7.0.50.0030.07017.98
7.0.40.0070.04020.11
7.0.30.0300.06320.20
7.0.20.0470.05720.26
7.0.10.0070.09020.09
7.0.00.0030.09020.19
5.6.280.0000.03721.12
5.6.210.0030.04020.74
5.6.200.0030.07018.15
5.6.190.0070.04320.51
5.6.180.0230.08020.43
5.6.170.0330.07320.39
5.6.160.0030.07720.57
5.6.150.0030.05318.16
5.6.140.0100.03718.17
5.6.130.0030.06018.15
5.6.120.0070.08721.04
5.6.110.0170.07021.12
5.6.100.0200.07021.09
5.6.90.0100.08321.07
5.6.80.0130.07720.45
5.5.350.0100.07720.39
5.5.340.0070.06718.05
5.5.330.0130.08020.40
5.5.320.0530.05320.52
5.5.310.0200.04320.50
5.5.300.0070.07318.02
5.5.290.0070.04317.98
5.5.280.0070.08320.95
5.5.270.0070.07720.77
5.5.260.0130.08320.77
5.5.250.0000.04320.69
5.5.240.0130.04720.13

preferences:
39.31 ms | 401 KiB | 5 Q