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 strcmp($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.60.0120.00916.61
8.3.50.0150.00321.09
8.3.40.0140.00318.71
8.3.30.0150.00718.69
8.3.20.0060.00320.07
8.3.10.0050.00323.71
8.3.00.0040.00421.90
8.2.180.0100.01016.50
8.2.170.0040.01122.96
8.2.160.0030.01020.52
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0070.00020.90
8.2.120.0080.00026.35
8.2.110.0000.01120.38
8.2.100.0040.00717.72
8.2.90.0000.00817.80
8.2.80.0000.00819.31
8.2.70.0000.00817.93
8.2.60.0000.00817.93
8.2.50.0040.00418.10
8.2.40.0040.00420.68
8.2.30.0000.00719.62
8.2.20.0080.00017.74
8.2.10.0050.00218.05
8.2.00.0000.00718.09
8.1.280.0070.00725.92
8.1.270.0040.00422.13
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0070.00320.86
8.1.230.0060.00622.80
8.1.220.0040.00417.78
8.1.210.0030.00618.77
8.1.200.0000.00817.35
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0080.00018.64
8.1.160.0070.00022.07
8.1.150.0040.00418.96
8.1.140.0000.00819.46
8.1.130.0000.00717.59
8.1.120.0050.00317.52
8.1.110.0040.00417.32
8.1.100.0030.00517.32
8.1.90.0070.00017.40
8.1.80.0000.00717.38
8.1.70.0040.00417.38
8.1.60.0020.00517.46
8.1.50.0040.00417.47
8.1.40.0040.00817.36
8.1.30.0000.00817.51
8.1.20.0030.00517.50
8.1.10.0000.00717.44
8.1.00.0000.00817.35
8.0.300.0050.00221.93
8.0.290.0000.00716.63
8.0.280.0040.00418.36
8.0.270.0030.00317.27
8.0.260.0060.00017.26
8.0.250.0030.00316.86
8.0.240.0080.00016.98
8.0.230.0040.00416.84
8.0.220.0000.00616.71
8.0.210.0030.00316.85
8.0.200.0030.00316.79
8.0.190.0070.00016.77
8.0.180.0000.00716.90
8.0.170.0070.00016.83
8.0.160.0040.00416.80
8.0.150.0000.00816.67
8.0.140.0000.00716.70
8.0.130.0060.00013.27
8.0.120.0080.00016.81
8.0.110.0000.00716.70
8.0.100.0040.00416.85
8.0.90.0040.00416.79
8.0.80.0060.00916.88
8.0.70.0030.00516.86
8.0.60.0000.00816.87
8.0.50.0050.00316.70
8.0.30.0140.00517.31
8.0.20.0120.00617.40
8.0.10.0040.00317.01
8.0.00.0090.01216.64
7.4.330.0020.00216.79
7.4.320.0030.00316.46
7.4.300.0090.00016.55
7.4.290.0070.00016.36
7.4.280.0030.00516.59
7.4.270.0000.00716.55
7.4.260.0030.00316.53
7.4.250.0040.00416.40
7.4.240.0000.00716.55
7.4.230.0000.00716.37
7.4.220.0030.01616.62
7.4.210.0070.00716.44
7.4.200.0070.00016.29
7.4.160.0120.00316.52
7.4.150.0130.00617.40
7.4.140.0140.01017.86
7.4.130.0070.01316.54
7.4.120.0060.01216.63
7.4.110.0070.01716.28
7.4.100.0060.01216.52
7.4.90.0150.00916.46
7.4.80.0060.01019.39
7.4.70.0120.04216.57
7.4.60.0110.00616.24
7.4.50.0020.01416.29
7.4.40.0090.01216.29
7.4.30.0060.00916.38
7.4.20.0130.00316.41
7.4.10.0060.01016.33
7.4.00.0100.00815.58
7.3.330.0060.00313.08
7.3.320.0000.00613.26
7.3.310.0030.00316.40
7.3.300.0030.00316.12
7.3.290.0030.00316.17
7.3.280.0090.01116.28
7.3.270.0120.01217.40
7.3.260.0130.00316.27
7.3.250.0080.00916.32
7.3.240.0090.00816.29
7.3.230.0160.00816.40
7.3.210.0100.00716.34
7.3.200.0080.00716.45
7.3.190.0060.01016.49
7.3.180.0040.01216.37
7.3.170.0080.00916.52
7.3.160.0130.00916.30
7.3.150.0070.01016.27
7.3.140.0060.01016.38
7.3.130.0100.01016.47
7.3.120.0110.00915.51
7.3.110.0070.01015.56
7.3.100.0080.00815.78
7.3.90.0110.00515.69
7.3.80.0130.00315.41
7.3.70.0060.00815.57
7.3.60.0070.01115.42
7.3.50.0070.01015.44
7.3.40.0090.00915.52
7.3.30.0040.00815.54
7.3.20.0140.00516.35
7.3.10.0100.00416.29
7.3.00.0100.00616.16
7.2.330.0070.01516.59
7.2.320.0150.00616.51
7.2.310.0140.00416.54
7.2.300.0070.01416.55
7.2.290.0140.00516.24
7.2.280.0000.01816.43
7.2.270.0060.01316.69
7.2.260.0120.00916.84
7.2.250.0020.01815.67
7.2.240.0060.01515.74
7.2.230.0060.01315.83
7.2.220.0070.01015.82
7.2.210.0100.00815.78
7.2.200.0050.01015.64
7.2.190.0050.01215.71
7.2.180.0100.00715.72
7.2.170.0110.00715.80
7.2.160.0090.00916.64
7.2.150.0160.00016.49
7.2.140.0120.00616.63
7.2.130.0160.00316.45
7.2.120.0140.00716.60
7.2.110.0110.00916.29
7.2.100.0130.01216.39
7.2.90.0170.00816.55
7.2.80.0140.00516.48
7.2.70.0210.00616.47
7.2.60.0150.00716.78
7.2.50.0160.00816.36
7.2.40.0140.02116.46
7.2.30.0110.01216.57
7.2.20.0160.00316.51
7.2.10.0210.00616.52
7.2.00.0140.00817.52
7.1.330.0050.01015.54
7.1.320.0090.00315.72
7.1.310.0090.00815.77
7.1.300.0070.00515.64
7.1.290.0130.00215.71
7.1.280.0050.00715.69
7.1.270.0080.00815.64
7.1.260.0050.01115.54
7.1.250.0110.00615.42
7.1.240.0110.00615.48
7.1.230.0060.01115.33
7.1.220.0120.00915.26
7.1.210.0110.00515.45
7.1.200.0030.01115.65
7.1.190.0120.00715.46
7.1.180.0140.00715.44
7.1.170.0180.00715.43
7.1.160.0190.00515.37
7.1.150.0120.00615.28
7.1.140.0130.00315.43
7.1.130.0150.00615.44
7.1.120.0090.00615.63
7.1.110.0160.00615.57
7.1.100.0100.00716.55
7.1.90.0080.00815.44
7.1.80.0120.01015.47
7.1.70.0050.00916.14
7.1.60.0090.00917.47
7.1.50.0070.00616.28
7.1.40.0100.01015.44
7.1.30.0120.00415.62
7.1.20.0100.00615.52
7.1.10.0160.00015.30
7.1.00.0050.04318.84
7.0.330.0090.01215.14
7.0.320.0100.00715.14
7.0.310.0090.01315.01
7.0.300.0160.00815.31
7.0.290.0160.00815.29
7.0.280.0110.01115.04
7.0.270.0120.00915.16
7.0.260.0030.01415.12
7.0.250.0210.00015.23
7.0.240.0090.00915.26
7.0.230.0150.01215.28
7.0.220.0090.01215.11
7.0.210.0100.01315.04
7.0.200.0330.00315.02
7.0.190.0130.00515.21
7.0.180.0130.00315.19
7.0.170.0130.00615.19
7.0.160.0130.00615.31
7.0.150.0090.00615.28
7.0.140.0000.02115.28
7.0.130.0040.01315.25
7.0.120.0140.00315.27
7.0.110.0150.00315.14
7.0.100.0140.00515.11
7.0.90.0050.01315.39
7.0.80.0070.01115.41
7.0.70.0060.01215.30
7.0.60.0180.03317.48
7.0.50.0120.04216.63
7.0.40.0080.04817.64
7.0.30.0150.05017.64
7.0.20.0220.03817.62
7.0.10.0070.02417.82
7.0.00.0110.03717.68
5.6.400.0100.01115.80
5.6.390.0130.01015.92
5.6.380.0070.01115.91
5.6.370.0100.01615.99
5.6.360.0160.00815.88
5.6.350.0130.00916.07
5.6.340.0100.01315.75
5.6.330.0060.01315.95
5.6.320.0090.01816.09
5.6.310.0120.01515.79
5.6.300.0030.02216.12
5.6.290.0120.00816.19
5.6.280.0090.02018.52
5.6.270.0160.00515.86
5.6.260.0190.00315.89
5.6.250.0110.00916.08
5.6.240.0000.01816.00
5.6.230.0130.00715.87
5.6.220.0130.00816.21
5.6.210.0120.03718.30
5.6.200.0060.04416.98
5.6.190.0100.04018.23
5.6.180.0200.04018.19
5.6.170.0220.04218.27
5.6.160.0070.04718.26
5.6.150.0070.04517.00
5.6.140.0090.04516.96
5.6.130.0050.02817.22
5.6.120.0080.02518.64
5.6.110.0050.04118.30
5.6.100.0090.02118.34
5.6.90.0160.04218.50
5.6.80.0090.04418.03
5.6.70.0100.01015.73
5.6.60.0060.01215.86
5.6.50.0170.00315.79
5.6.40.0060.01315.95
5.6.30.0110.00816.03
5.6.20.0070.01115.94
5.6.10.0150.00315.83
5.6.00.0150.00515.88
5.5.380.0100.01015.63
5.5.370.0160.00815.81
5.5.360.0100.01015.58
5.5.350.0080.02118.10
5.5.340.0090.02916.91
5.5.330.0120.04318.11
5.5.320.0300.02918.16
5.5.310.0130.03518.11
5.5.300.0030.04716.96
5.5.290.0100.02416.85
5.5.280.0070.04718.37
5.5.270.0080.03018.25
5.5.260.0130.03818.38
5.5.250.0080.02618.25
5.5.240.0170.02518.09
5.5.230.0150.00315.85
5.5.220.0100.01015.81
5.5.210.0080.01115.68
5.5.200.0070.01115.74
5.5.190.0090.00915.69
5.5.180.0080.01315.73
5.5.170.0100.01015.79
5.5.160.0100.01015.48
5.5.150.0150.00315.80
5.5.140.0130.00615.77
5.5.130.0030.01615.81
5.5.120.0110.00715.64
5.5.110.0130.01415.48
5.5.100.0130.01015.78
5.5.90.0120.01215.85
5.5.80.0100.01315.57
5.5.70.0170.00715.65
5.5.60.0050.01515.71
5.5.50.0060.01215.75
5.5.40.0070.01115.49
5.5.30.0100.00715.55
5.5.20.0070.01015.88
5.5.10.0090.00915.75
5.5.00.0150.00315.70

preferences:
39.83 ms | 401 KiB | 5 Q