3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Counter { /** @return self */ public function count(); /** @return int */ public function getCount(); } class EchoingCounter implements Counter { private $counter; public function __construct(Counter $counter) { $this->counter = $counter; } public function count() { echo __METHOD__ . "\n"; return $this->counter->count(); } public function getCount() { echo __METHOD__ . "\n"; return $this->counter->getCount(); } } $counter = new EchoingCounter(new FluentCounter()); $counter = $counter->count()->count()->count()->count(); echo $counter->getCount();

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.0070.01118.43
8.3.50.0100.01022.05
8.3.40.0140.00718.83
8.3.30.0060.01219.04
8.3.20.0070.00020.34
8.3.10.0040.00422.10
8.3.00.0070.00022.25
8.2.180.0190.00316.75
8.2.170.0140.00022.96
8.2.160.0140.00020.94
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00819.36
8.2.110.0000.00922.08
8.2.100.0080.00717.72
8.2.90.0030.00619.27
8.2.80.0050.00217.97
8.2.70.0030.00617.59
8.2.60.0000.01018.05
8.2.50.0000.00818.07
8.2.40.0040.00418.16
8.2.30.0040.00417.95
8.2.20.0000.00717.64
8.2.10.0050.00319.41
8.2.00.0080.00017.80
8.1.280.0120.00925.92
8.1.270.0090.00623.77
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0090.00023.71
8.1.230.0000.01219.07
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0040.00417.23
8.1.190.0050.00317.39
8.1.180.0000.00818.72
8.1.170.0040.00418.65
8.1.160.0060.00321.96
8.1.150.0000.00718.57
8.1.140.0040.00417.40
8.1.130.0070.00017.73
8.1.120.0030.00317.41
8.1.110.0040.00417.31
8.1.100.0000.00817.39
8.1.90.0040.00417.33
8.1.80.0000.00717.41
8.1.70.0030.00317.43
8.1.60.0060.00317.56
8.1.50.0050.00317.40
8.1.40.0080.00017.34
8.1.30.0040.00417.48
8.1.20.0040.00417.54
8.1.10.0000.00717.57
8.1.00.0040.00417.32
8.0.300.0000.00818.77
8.0.290.0040.00417.05
8.0.280.0000.00718.45
8.0.270.0020.00517.36
8.0.260.0040.00416.81
8.0.250.0000.00816.95
8.0.240.0040.00416.98
8.0.230.0100.00017.02
8.0.220.0030.00316.95
8.0.210.0000.00716.98
8.0.200.0030.00316.88
8.0.190.0070.00017.09
8.0.180.0070.00016.86
8.0.170.0040.00416.98
8.0.160.0000.00716.99
8.0.150.0000.00716.86
8.0.140.0040.00416.83
8.0.130.0030.00313.46
8.0.120.0050.00316.84
8.0.110.0050.00316.98
8.0.100.0050.00316.99
8.0.90.0030.00516.79
8.0.80.0060.01016.86
8.0.70.0040.00416.82
8.0.60.0000.00716.90
8.0.50.0030.00516.98
8.0.30.0140.00717.01
8.0.20.0110.00717.40
8.0.10.0000.00716.91
8.0.00.0080.01316.63
7.4.330.0000.00515.00
7.4.320.0000.00616.45
7.4.300.0000.00616.38
7.4.290.0000.00816.49
7.4.280.0000.00716.55
7.4.270.0000.00816.55
7.4.260.0030.00316.34
7.4.250.0080.00016.45
7.4.240.0040.00316.47
7.4.230.0000.00716.27
7.4.220.0090.00916.58
7.4.210.0080.00816.54
7.4.200.0070.00016.66
7.4.190.0040.00416.36
7.4.160.0030.01216.45
7.4.150.0100.00717.40
7.4.140.0120.00717.86
7.4.130.0090.00816.54
7.4.120.0100.01216.45
7.4.110.0140.00316.73
7.4.100.0200.00316.53
7.4.90.0090.01416.59
7.4.80.0100.01019.39
7.4.70.0170.00016.55
7.4.60.0030.01716.46
7.4.50.0000.00616.49
7.4.40.0060.00922.77
7.4.30.0090.01216.48
7.4.00.0060.00615.14
7.3.330.0050.00013.34
7.3.320.0000.00513.37
7.3.310.0000.00716.23
7.3.300.0000.00616.22
7.3.290.0040.01116.37
7.3.280.0070.01016.34
7.3.270.0060.01117.40
7.3.260.0000.01816.44
7.3.250.0080.00816.55
7.3.240.0030.01916.57
7.3.230.0110.00816.55
7.3.210.0080.01116.53
7.3.200.0080.00819.39
7.3.190.0070.01116.49
7.3.180.0060.01216.58
7.3.170.0190.00616.38
7.3.160.0000.01716.34
7.3.120.0040.01214.50
7.2.330.0090.00916.41
7.2.320.0090.00916.54
7.2.310.0130.01016.54
7.2.300.0060.01216.63
7.2.290.0050.01116.38
7.2.60.0070.01016.86
7.2.00.0070.00719.49
7.1.200.0090.00615.38
7.1.70.0070.00717.17
7.1.60.0050.00517.17
7.1.50.0070.01416.90
7.1.00.0030.07722.37
7.0.200.0000.01016.43
7.0.140.0030.07321.96
7.0.60.0030.08020.05
7.0.50.0030.08017.98
7.0.40.0100.03720.13
7.0.30.0400.06020.09
7.0.20.0270.04020.08
7.0.10.0070.04020.12
7.0.00.0100.04320.14
5.6.280.0070.07020.91
5.6.210.0130.07720.57
5.6.200.0000.04718.29
5.6.190.0000.06020.61
5.6.180.0330.04020.39
5.6.170.0330.04320.44
5.6.160.0000.05720.69
5.6.150.0130.07018.19
5.6.140.0030.04018.19
5.6.130.0130.07718.18
5.6.120.0000.04321.12
5.6.110.0070.04021.04
5.6.100.0000.04721.03
5.6.90.0070.04021.13
5.6.80.0100.08020.38
5.6.70.4400.03720.43
5.5.350.0030.08320.44
5.5.340.0100.05317.95
5.5.330.0100.05320.19
5.5.320.0330.07020.19
5.5.310.0230.06320.35
5.5.300.0030.05017.93
5.5.290.0070.08717.93
5.5.280.0130.07720.89
5.5.270.0100.08020.97
5.5.260.0030.08720.94
5.5.250.0200.07320.63
5.5.240.0000.08020.33
5.4.450.0300.05719.34
5.4.440.0400.06719.38
5.4.430.0200.06719.63
5.4.420.0000.06719.36
5.4.410.0100.05319.42
5.4.400.1930.00018.81
5.4.390.1430.00018.81
5.4.380.0300.04718.51
5.4.370.0270.05018.78
5.4.360.0400.04018.47
5.4.350.0300.05318.52
5.4.340.0270.05018.75
5.4.320.0070.04012.50
5.4.310.0050.04012.50
5.4.300.0090.03912.51
5.4.290.0080.04612.50
5.4.280.0060.03612.40
5.4.270.0060.04012.40
5.4.260.0230.06319.09
5.4.250.0070.06019.09
5.4.240.0100.05318.76
5.4.230.0070.05318.65
5.4.220.0100.07718.79
5.4.210.0130.05019.00
5.4.200.0100.05318.93
5.4.190.0000.08718.95
5.4.180.0100.05018.99
5.4.170.0030.05718.96
5.4.160.0170.06018.75
5.4.150.0200.07018.93
5.4.140.0130.05716.42
5.4.130.0070.04716.48
5.4.120.0170.05716.37
5.4.110.0100.07016.46
5.4.100.0000.05716.38
5.4.90.0130.06316.50
5.4.80.0030.05716.69
5.4.70.0130.06716.39
5.4.60.0070.05016.38
5.4.50.0100.06316.48
5.4.40.0100.05316.59
5.4.30.0100.06016.36
5.4.20.0230.05716.41
5.4.10.0030.06316.30
5.4.00.0100.05316.04
5.3.290.0060.04012.80
5.3.280.0100.07014.77
5.3.270.0000.06014.53
5.3.260.0170.07014.63
5.3.250.0130.05014.63
5.3.240.0100.06314.69
5.3.230.0130.04714.83
5.3.220.0070.07314.71
5.3.210.0230.05714.57
5.3.200.0100.06714.66
5.3.190.0100.05714.66
5.3.180.0100.06314.56
5.3.170.0170.07314.73
5.3.160.0100.05314.64
5.3.150.0100.05014.48
5.3.140.0070.05014.55
5.3.130.0070.07314.69
5.3.120.0100.05314.54
5.3.110.0130.05314.46
5.3.100.0100.04714.12
5.3.90.0030.05314.09
5.3.80.0200.04014.20
5.3.70.0100.04714.24
5.3.60.0200.03714.09
5.3.50.0070.06313.86
5.3.40.0130.05713.95
5.3.30.0100.05713.99
5.3.20.0100.06313.54
5.3.10.0070.05013.64
5.3.00.0100.04713.63
5.2.170.0100.05011.22
5.2.160.0070.04311.05
5.2.150.0070.04311.12
5.2.140.0030.04711.11
5.2.130.0070.05011.09
5.2.120.0030.04711.17
5.2.110.0070.03711.02
5.2.100.0000.04711.20
5.2.90.0070.03711.33
5.2.80.0130.03311.26
5.2.70.0070.04311.19
5.2.60.0030.04711.14
5.2.50.0100.06010.86
5.2.40.0230.03311.00
5.2.30.0100.03710.81
5.2.20.0070.04010.96
5.2.10.0070.04010.95
5.2.00.0030.06010.74
5.1.60.0070.03010.20
5.1.50.0070.0339.98
5.1.40.0030.04710.14
5.1.30.0030.04010.42
5.1.20.0100.03310.35
5.1.10.0070.04710.11
5.1.00.0070.03310.08
5.0.50.0070.0238.75
5.0.40.0030.0308.38
5.0.30.0030.0438.07
5.0.20.0000.0308.36
5.0.10.0000.0338.19
5.0.00.0000.0538.09
4.4.90.0030.0307.02
4.4.80.0030.0207.02
4.4.70.0030.0207.02
4.4.60.0000.0237.02
4.4.50.0000.0237.02
4.4.40.0100.0277.02
4.4.30.0070.0237.02
4.4.20.0070.0207.02
4.4.10.0000.0277.02
4.4.00.0030.0337.02
4.3.110.0130.0107.02
4.3.100.0070.0177.02
4.3.90.0000.0237.02
4.3.80.0000.0337.02
4.3.70.0030.0307.02
4.3.60.0100.0137.02
4.3.50.0070.0277.02
4.3.40.0130.0237.02
4.3.30.0030.0207.02
4.3.20.0000.0277.02
4.3.10.0030.0207.02
4.3.00.0100.0137.33

preferences:
42.91 ms | 401 KiB | 5 Q