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) { print_r($this->a); 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 ? -1 : ($x > $y ? 1 : 0)); } 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.40.0110.00718.84
8.3.30.0100.01018.67
8.3.20.0000.00719.96
8.3.10.0050.00323.38
8.3.00.0000.00823.52
8.2.170.0140.00722.96
8.2.160.0070.00720.38
8.2.150.0070.00024.18
8.2.140.0030.00524.66
8.2.130.0050.00321.07
8.2.120.0000.00726.35
8.2.110.0050.00519.27
8.2.100.0040.00717.93
8.2.90.0000.00819.17
8.2.80.0060.00317.97
8.2.70.0090.00017.38
8.2.60.0080.00418.05
8.2.50.0070.00418.09
8.2.40.0030.00622.19
8.2.30.0040.00419.53
8.2.20.0040.00417.84
8.2.10.0000.00818.07
8.2.00.0030.00518.01
8.1.270.0000.00822.14
8.1.260.0030.00528.09
8.1.250.0070.00028.09
8.1.240.0030.00622.21
8.1.230.0030.00717.83
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0030.00617.38
8.1.190.0040.00417.23
8.1.180.0030.00518.10
8.1.170.0030.01018.59
8.1.160.0030.00520.82
8.1.150.0030.00619.02
8.1.140.0050.00319.58
8.1.130.0030.00317.72
8.1.120.0020.00517.52
8.1.110.0000.00717.25
8.1.100.0060.00317.36
8.1.90.0070.00317.43
8.1.80.0000.00717.33
8.1.70.0000.00817.39
8.1.60.0040.00417.53
8.1.50.0060.00317.54
8.1.40.0040.00417.42
8.1.30.0030.00617.62
8.1.20.0050.00317.54
8.1.10.0000.00717.52
8.1.00.0000.00817.53
8.0.300.0080.00018.77
8.0.290.0050.00216.60
8.0.280.0000.00718.39
8.0.270.0070.00017.27
8.0.260.0000.00617.34
8.0.250.0030.00316.99
8.0.240.0040.00416.97
8.0.230.0040.00416.87
8.0.220.0060.00316.83
8.0.210.0030.00616.82
8.0.200.0000.00716.86
8.0.190.0070.00016.83
8.0.180.0040.00416.85
8.0.170.0050.00216.87
8.0.160.0040.00416.93
8.0.150.0050.00216.78
8.0.140.0050.00516.81
8.0.130.0030.00313.24
8.0.120.0060.00316.73
8.0.110.0000.00716.75
8.0.100.0000.00716.65
8.0.90.0040.00416.90
8.0.80.0150.00016.74
8.0.70.0040.00416.90
8.0.60.0030.00516.68
8.0.50.0040.00416.71
8.0.30.0130.00617.23
8.0.20.0100.01017.40
8.0.10.0040.00416.88
8.0.00.0090.01116.85
7.4.330.0020.00216.77
7.4.320.0000.00616.57
7.4.300.0040.00416.48
7.4.290.0040.00416.46
7.4.280.0000.00816.56
7.4.270.0030.00316.48
7.4.260.0000.00716.35
7.4.250.0070.00016.42
7.4.240.0030.00316.49
7.4.230.0000.00716.36
7.4.220.0090.01316.43
7.4.210.0060.01116.55
7.4.200.0030.00316.54
7.4.160.0130.00716.52
7.4.150.0070.01017.40
7.4.140.0080.01017.86
7.4.130.0060.01316.63
7.4.120.0100.00916.40
7.4.110.0130.01016.58
7.4.100.0110.00816.56
7.4.90.0170.00716.51
7.4.80.0060.01519.39
7.4.70.0100.00616.60
7.4.60.0100.00716.51
7.4.50.0070.01016.20
7.4.40.0060.00916.45
7.4.30.0100.00916.42
7.4.00.0080.00914.72
7.3.330.0080.00013.18
7.3.320.0050.00013.34
7.3.310.0030.00316.21
7.3.300.0030.00316.29
7.3.290.0050.00216.21
7.3.280.0070.01116.31
7.3.270.0100.01017.40
7.3.260.0060.00916.39
7.3.250.0090.01016.41
7.3.240.0100.00816.54
7.3.230.0040.01416.39
7.3.210.0090.01216.37
7.3.200.0060.01219.39
7.3.190.0110.01116.55
7.3.180.0110.00616.39
7.3.170.0060.00916.34
7.3.160.0150.00016.40
7.3.120.0030.01014.79
7.3.110.0030.01014.67
7.3.100.0090.00614.78
7.3.90.0030.01414.54
7.3.80.0030.01014.61
7.3.70.0040.00414.67
7.3.60.0080.00814.69
7.3.50.0090.00014.63
7.3.40.0060.00614.86
7.3.30.0060.00314.69
7.3.20.0090.00616.52
7.3.10.0090.00416.36
7.3.00.0060.00716.48
7.2.330.0100.00616.52
7.2.320.0160.00616.45
7.2.310.0130.00716.52
7.2.300.0030.01316.50
7.2.290.0100.00616.79
7.2.250.0060.00715.19
7.2.240.0080.01115.05
7.2.230.0060.00915.05
7.2.220.0090.00915.07
7.2.210.0070.00715.10
7.2.200.0000.01415.25
7.2.190.0050.00514.79
7.2.180.0030.00915.18
7.2.170.0060.00615.09
7.2.130.0070.01016.81
7.2.120.0090.00716.91
7.2.110.0070.00616.77
7.2.100.0080.00816.69
7.2.90.0060.00916.67
7.2.80.0060.00916.85
7.2.70.0100.00816.90
7.2.60.0070.00816.83
7.2.50.0070.00616.55
7.2.40.0080.01016.76
7.2.30.0100.00516.82
7.2.20.0070.00516.94
7.2.10.0080.00716.54
7.2.00.0070.00717.62
7.1.330.0100.00316.05
7.1.320.0070.01015.88
7.1.310.0100.00715.70
7.1.300.0070.00715.80
7.1.290.0060.00915.71
7.1.280.0030.00715.84
7.1.270.0060.00615.60
7.1.260.0080.00615.97
7.1.250.0100.00515.59
7.1.200.0060.00615.70
7.1.100.0030.00917.86
7.1.70.0100.00317.20
7.1.60.0070.01719.40
7.1.50.0060.00616.95
7.1.00.0030.07722.29
7.0.200.0560.00614.66
7.0.60.0230.03020.00
7.0.50.0100.03717.86
7.0.40.0030.09020.18
7.0.30.0230.07320.10
7.0.20.0170.04320.30
7.0.10.0070.08020.16
7.0.00.0100.08720.25
5.6.280.0000.04020.93
5.6.210.0070.08020.77
5.6.200.0170.03018.24
5.6.190.0070.09020.45
5.6.180.0200.06020.67
5.6.170.0230.08020.71
5.6.160.0030.06320.41
5.6.150.0100.07718.25
5.6.140.0100.05318.14
5.6.130.0100.06018.24
5.6.120.0100.03721.02
5.6.110.0100.08320.92
5.6.100.0130.03321.12
5.6.90.0100.07321.14
5.6.80.0170.07320.50
5.5.350.0000.03320.39
5.5.340.0100.07018.05
5.5.330.0070.04320.47
5.5.320.0200.04320.27
5.5.310.0230.08020.32
5.5.300.0030.04717.96
5.5.290.0100.08017.94
5.5.280.0100.08020.96
5.5.270.0100.06720.88
5.5.260.0130.07720.64
5.5.250.0070.03720.59
5.5.240.0100.04720.24

preferences:
39.49 ms | 400 KiB | 5 Q