3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function spam(array $values) { usort($values, [$this, 'sort']); return $values; } protected function sort($a, $b) { return -1; } } $a = [ 3, 4, 1, 2, ]; $foo = new Foo(); var_dump($foo->spam($a));

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.0120.00318.03
8.3.60.0190.00316.74
8.3.50.0120.00821.95
8.3.40.0090.00618.63
8.3.30.0110.00418.71
8.3.20.0050.00220.33
8.3.10.0040.00423.51
8.3.00.0080.00019.13
8.2.190.0150.00616.58
8.2.180.0120.00418.13
8.2.170.0120.00322.96
8.2.160.0070.00722.31
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0040.00419.23
8.2.120.0040.00426.35
8.2.110.0000.01020.48
8.2.100.0060.00617.90
8.2.90.0060.00319.27
8.2.80.0080.00017.97
8.2.70.0090.00017.50
8.2.60.0060.00317.68
8.2.50.0050.00318.07
8.2.40.0040.00419.38
8.2.30.0000.00720.53
8.2.20.0000.00917.56
8.2.10.0000.00718.01
8.2.00.0080.00018.07
8.1.280.0040.01225.92
8.1.270.0040.00422.00
8.1.260.0070.00028.09
8.1.250.0050.00328.09
8.1.240.0070.01023.92
8.1.230.0060.00617.64
8.1.220.0060.00317.76
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0050.00317.22
8.1.180.0070.00018.10
8.1.170.0050.00318.82
8.1.160.0000.00722.00
8.1.150.0040.00418.80
8.1.140.0050.00319.49
8.1.130.0000.00717.70
8.1.120.0080.00017.36
8.1.110.0040.00417.48
8.1.100.0040.00417.53
8.1.90.0020.00517.30
8.1.80.0000.00717.41
8.1.70.0040.00417.39
8.1.60.0000.00817.57
8.1.50.0030.00617.55
8.1.40.0000.00817.57
8.1.30.0040.00417.71
8.1.20.0000.00817.49
8.1.10.0030.00617.63
8.1.00.0070.00017.58
8.0.300.0030.00518.77
8.0.290.0040.00416.63
8.0.280.0030.00318.41
8.0.270.0070.00017.23
8.0.260.0070.00018.45
8.0.250.0040.00416.86
8.0.240.0030.00516.86
8.0.230.0070.00016.96
8.0.220.0030.00316.87
8.0.210.0040.00416.81
8.0.200.0000.00716.87
8.0.190.0000.00916.92
8.0.180.0080.00016.91
8.0.170.0000.00816.80
8.0.160.0040.00416.93
8.0.150.0050.00316.84
8.0.140.0070.00316.80
8.0.130.0000.00513.30
8.0.120.0000.00816.77
8.0.110.0030.00516.83
8.0.100.0040.00416.91
8.0.90.0030.00416.88
8.0.80.0060.00916.81
8.0.70.0000.00716.88
8.0.60.0040.00416.79
8.0.50.0040.00416.74
8.0.30.0130.00717.12
8.0.20.0110.00717.40
8.0.10.0040.00416.90
8.0.00.0100.00916.82
7.4.330.0000.00516.79
7.4.320.0060.00016.43
7.4.300.0070.00016.51
7.4.290.0000.00716.61
7.4.280.0050.00316.61
7.4.270.0000.00616.53
7.4.260.0040.00416.59
7.4.250.0000.00816.56
7.4.240.0050.00216.53
7.4.230.0040.00416.58
7.4.220.0180.00916.46
7.4.210.0100.00616.55
7.4.200.0000.00716.35
7.4.160.0110.00416.49
7.4.150.0150.00317.40
7.4.140.0050.02017.86
7.4.130.0090.00916.51
7.4.120.0120.00816.63
7.4.110.0090.00916.39
7.4.100.0040.01516.53
7.4.90.0160.00316.55
7.4.80.0180.00319.39
7.4.70.0120.01216.59
7.4.60.0130.00416.55
7.4.50.0060.01016.38
7.4.40.0070.01316.55
7.4.30.0150.00916.47
7.4.00.0100.00315.22
7.3.330.0030.00313.23
7.3.320.0050.00013.26
7.3.310.0060.00016.29
7.3.300.0030.00316.18
7.3.290.0090.00716.29
7.3.280.0100.00916.30
7.3.270.0090.00917.40
7.3.260.0160.00016.23
7.3.250.0100.01216.30
7.3.240.0090.01116.22
7.3.230.0080.00816.39
7.3.210.0130.00316.61
7.3.200.0000.01616.42
7.3.190.0110.00516.10
7.3.180.0100.00716.38
7.3.170.0140.01216.30
7.3.160.0040.01116.47
7.2.330.0060.01316.72
7.2.320.0100.01416.64
7.2.310.0060.01216.70
7.2.300.0000.01616.76
7.2.290.0090.00916.74
7.2.60.0080.00416.95
7.2.50.0060.00316.68
7.2.00.0030.01019.32
7.1.200.0030.00615.55
7.1.100.0000.01317.95
7.1.70.0040.00816.97
7.1.60.0140.01119.48
7.1.50.0110.00816.96
7.1.00.0070.07322.40
7.0.200.0320.00314.47
7.0.60.0100.08320.04
7.0.50.0000.04317.78
7.0.40.0100.04320.40
7.0.30.0270.08020.33
7.0.20.0370.08020.22
7.0.10.0000.06720.23
7.0.00.0100.08320.07
5.6.280.0070.07020.89
5.6.210.0030.08320.65
5.6.200.0070.05718.20
5.6.190.0030.08320.50
5.6.180.0170.04020.67
5.6.170.0230.05720.50
5.6.160.0070.07720.55
5.6.150.0070.08718.29
5.6.140.0000.05318.14
5.6.130.0030.05018.27
5.6.120.0030.09020.98
5.6.110.0070.08321.01
5.6.100.0170.03321.03
5.6.90.0070.06721.11
5.6.80.0070.08020.38
5.5.350.3000.03720.32
5.5.340.0030.04017.95
5.5.330.0170.06320.25
5.5.320.0670.07320.23
5.5.310.0300.04720.23
5.5.300.0030.08317.93
5.5.290.0030.08717.98
5.5.280.0030.06320.80
5.5.270.0030.04020.68
5.5.260.0100.07020.87
5.5.250.0100.06720.66
5.5.240.0300.07320.07

preferences:
52.44 ms | 401 KiB | 5 Q