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; } 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.00618.28
8.3.60.0150.00316.50
8.3.50.0070.01421.14
8.3.40.0040.01418.83
8.3.30.0090.01318.66
8.3.20.0000.00720.38
8.3.10.0070.00023.56
8.3.00.0000.00723.66
8.2.190.0090.00616.58
8.2.180.0120.00318.27
8.2.170.0100.00722.96
8.2.160.0100.00320.57
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00421.12
8.2.120.0000.00726.35
8.2.110.0000.00820.38
8.2.100.0060.00617.84
8.2.90.0040.00419.30
8.2.80.0000.00817.97
8.2.70.0000.00917.75
8.2.60.0070.00418.03
8.2.50.0060.00618.09
8.2.40.0060.00322.32
8.2.30.0040.00419.42
8.2.20.0070.00017.78
8.2.10.0070.00018.19
8.2.00.0050.00318.12
8.1.280.0210.00025.92
8.1.270.0070.00722.14
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0030.00623.54
8.1.230.0040.00721.04
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.47
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0070.00418.57
8.1.160.0070.00020.67
8.1.150.0040.00418.93
8.1.140.0000.00819.59
8.1.130.0070.00017.71
8.1.120.0040.00417.35
8.1.110.0080.00017.35
8.1.100.0000.00817.35
8.1.90.0000.00817.40
8.1.80.0030.00517.45
8.1.70.0030.00317.43
8.1.60.0000.00717.55
8.1.50.0000.00817.38
8.1.40.0040.00417.33
8.1.30.0060.00317.57
8.1.20.0040.00417.48
8.1.10.0040.00417.50
8.1.00.0040.00417.32
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0070.00018.45
8.0.270.0070.00017.19
8.0.260.0040.00417.21
8.0.250.0030.00317.04
8.0.240.0080.00017.08
8.0.230.0040.00417.00
8.0.220.0070.00016.84
8.0.210.0040.00416.89
8.0.200.0050.00216.95
8.0.190.0000.00716.93
8.0.180.0040.00416.82
8.0.170.0040.00416.84
8.0.160.0030.00316.98
8.0.150.0030.00516.90
8.0.140.0050.00216.93
8.0.130.0050.00013.31
8.0.120.0040.00416.87
8.0.110.0030.00516.96
8.0.100.0000.00716.79
8.0.90.0070.00016.71
8.0.80.0070.01016.94
8.0.70.0070.00016.84
8.0.60.0040.00416.77
8.0.50.0000.00816.79
8.0.30.0140.00417.18
8.0.20.0070.01117.40
8.0.10.0050.00217.05
8.0.00.0080.01216.91
7.4.330.0000.00516.76
7.4.320.0040.00416.54
7.4.300.0090.00016.56
7.4.290.0070.00016.37
7.4.280.0070.00016.45
7.4.270.0030.00316.56
7.4.260.0000.00716.46
7.4.250.0000.00716.51
7.4.240.0000.00716.60
7.4.230.0000.00716.45
7.4.220.0110.01116.64
7.4.210.0090.00616.51
7.4.200.0000.00716.48
7.4.160.0130.01016.48
7.4.150.0090.00817.40
7.4.140.0090.01117.86
7.4.130.0080.01216.50
7.4.120.0100.00716.62
7.4.110.0170.00316.42
7.4.100.0120.00616.46
7.4.90.0140.00416.52
7.4.80.0090.01019.39
7.4.70.0030.01416.60
7.4.60.0090.00916.68
7.4.50.0040.01116.44
7.4.40.0120.00416.42
7.4.30.0120.01216.50
7.4.00.0090.00614.89
7.3.330.0000.00713.32
7.3.320.0000.00513.13
7.3.310.0000.00716.31
7.3.300.0070.00016.30
7.3.290.0030.00316.12
7.3.280.0120.00616.31
7.3.270.0030.01417.40
7.3.260.0040.01416.21
7.3.250.0030.01416.41
7.3.240.0070.01416.38
7.3.230.0140.00316.45
7.3.210.0070.01016.53
7.3.200.0060.01219.39
7.3.190.0060.01516.22
7.3.180.0030.01316.39
7.3.170.0030.01616.32
7.3.160.0060.01116.38
7.2.330.0070.01016.69
7.2.320.0130.00316.67
7.2.310.0040.01316.54
7.2.300.0100.00716.54
7.2.290.0080.00816.54
7.2.60.0000.01516.90
7.2.00.0040.00719.64
7.1.200.0060.00315.87
7.1.100.0040.00418.19
7.1.70.0030.00517.26
7.1.60.0100.01319.40
7.1.50.0030.00917.09
7.1.00.0030.07722.41
7.0.200.0260.00314.80
7.0.60.0200.04720.02
7.0.50.0070.04017.89
7.0.40.0100.07720.13
7.0.30.0230.08720.26
7.0.20.0200.07320.06
7.0.10.0070.04720.30
7.0.00.0030.05320.11
5.6.280.0030.07320.83
5.6.210.0070.08020.77
5.6.200.0030.08018.21
5.6.190.0030.05320.65
5.6.180.0270.07720.55
5.6.170.0270.07720.55
5.6.160.0070.05020.70
5.6.150.0100.06018.29
5.6.140.0100.07318.18
5.6.130.0130.06318.23
5.6.120.0070.03720.98
5.6.110.0100.06321.09
5.6.100.0000.04320.95
5.6.90.0130.07721.03
5.6.80.0030.07320.55
5.5.350.0000.03320.45
5.5.340.0070.08017.97
5.5.330.0070.05720.37
5.5.320.0530.06720.24
5.5.310.0270.06320.31
5.5.300.0070.08317.95
5.5.290.0130.06317.95
5.5.280.0170.07320.65
5.5.270.0030.08320.95
5.5.260.0070.07320.95
5.5.250.0100.03320.46
5.5.240.0130.03720.20

preferences:
49.17 ms | 401 KiB | 5 Q