3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php 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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0120.00016.70
7.2.00.0070.00719.00
7.1.200.0070.00415.29
7.1.100.0060.00617.80
7.1.70.0030.00616.73
7.1.60.0000.02319.82
7.1.50.0040.01816.77
7.1.00.0130.06722.42
7.0.200.0030.00616.75
7.0.140.0000.07721.99
7.0.60.0130.06720.04
7.0.50.0000.04317.89
7.0.40.0000.05020.14
7.0.30.0270.05020.32
7.0.20.0100.05020.24
7.0.10.0200.04020.10
7.0.00.0170.04020.19
5.6.280.0070.07020.87
5.6.210.0030.08720.55
5.6.200.0070.07718.19
5.6.190.0130.07020.55
5.6.180.0270.07720.61
5.6.170.0300.04020.47
5.6.160.0030.09020.61
5.6.150.0070.07718.34
5.6.140.0100.07718.29
5.6.130.0130.04718.24
5.6.120.0070.08321.01
5.6.110.0070.04021.05
5.6.100.0100.06321.04
5.6.90.0030.06020.97
5.6.80.0070.07720.43
5.6.70.4330.03720.40
5.5.350.0370.06720.29
5.5.340.0030.08317.92
5.5.330.0130.08020.57
5.5.320.0130.06320.23
5.5.310.0370.06320.34
5.5.300.0030.08317.97
5.5.290.0000.05317.97
5.5.280.0070.05020.66
5.5.270.0000.06020.74
5.5.260.0030.06720.89
5.5.250.0130.08020.62
5.5.240.0170.07320.27
5.4.450.0100.05719.63
5.4.440.0830.06319.47
5.4.430.0130.05319.59
5.4.420.0100.06019.36
5.4.410.0100.05318.96
5.4.400.0300.06018.86
5.4.390.0270.06318.79
5.4.380.0200.05318.59
5.4.370.0100.05318.52
5.4.360.0170.04718.47
5.4.350.0050.03612.03
5.4.340.0050.04312.02
5.4.320.0060.03512.50
5.4.310.0080.04312.50
5.4.300.0080.03812.50
5.4.290.0040.03912.50
5.4.280.0090.03612.40
5.4.270.0090.04012.40
5.4.260.0070.05718.74
5.4.250.0130.05718.98
5.4.240.0130.05018.76
5.4.230.0270.03718.99
5.4.220.0070.06318.74
5.4.210.0200.04018.98
5.4.200.0230.06018.84
5.4.190.0100.05318.79
5.4.180.0130.05318.98
5.4.170.0070.06318.64
5.4.160.0100.05319.03
5.4.150.0100.05319.08
5.4.140.0170.05016.41
5.4.130.0170.05716.49
5.4.120.0030.05316.38
5.4.110.0030.05316.33
5.4.100.0200.06016.57
5.4.90.0100.04716.62
5.4.80.0130.05316.32
5.4.70.0130.05316.61
5.4.60.0100.05716.38
5.4.50.0200.04016.35
5.4.40.0100.05716.49
5.4.30.0070.04716.62
5.4.20.0030.05316.32
5.4.10.0030.05716.61
5.4.00.0030.05315.80
5.3.290.0040.04012.80
5.3.280.0100.06314.43
5.3.270.0030.05714.70
5.3.260.0030.06014.60
5.3.250.0030.08014.61
5.3.240.0030.05714.70
5.3.230.0170.05014.83
5.3.220.0100.07314.59
5.3.210.0030.05714.56
5.3.200.0070.05314.41
5.3.190.0100.05014.64
5.3.180.0170.04714.48
5.3.170.0070.05314.56
5.3.160.0100.05014.66
5.3.150.0100.07314.47
5.3.140.0130.05014.65
5.3.130.0100.05014.73
5.3.120.0100.05714.71
5.3.110.0130.05014.72
5.3.100.0030.05314.02
5.3.90.0070.05014.15
5.3.80.0100.05014.02
5.3.70.0070.06013.99
5.3.60.0030.06713.84
5.3.50.0170.06314.04
5.3.40.0070.05013.94
5.3.30.0100.04713.99
5.3.20.0130.04313.69
5.3.10.0070.04713.56
5.3.00.0030.05313.72
5.2.170.0200.04311.37
5.2.160.0000.05311.23
5.2.150.0170.04711.37
5.2.140.0070.04311.22
5.2.130.0100.03711.19
5.2.120.0070.04011.07
5.2.110.0030.04711.19
5.2.100.0100.03710.94
5.2.90.0130.04711.20
5.2.80.0070.04311.17
5.2.70.0100.06711.08
5.2.60.0130.03711.04
5.2.50.0030.05011.01
5.2.40.0000.04711.06
5.2.30.0100.03710.81
5.2.20.0000.04710.94
5.2.10.0070.05711.09
5.2.00.0100.03710.89
5.1.60.0030.03310.19
5.1.50.0130.03710.04
5.1.40.0070.0339.98
5.1.30.0070.03310.59
5.1.20.0130.02710.52
5.1.10.0070.03310.22
5.1.00.0100.03010.08
5.0.50.0030.0308.59
5.0.40.0070.0238.32
5.0.30.0000.0478.19
5.0.20.0030.0278.35
5.0.10.0070.0278.35
5.0.00.0130.0378.16
4.4.90.0100.0137.07
4.4.80.0030.0237.07
4.4.70.0030.0207.07
4.4.60.0030.0207.07
4.4.50.0000.0237.07
4.4.40.0000.0407.07
4.4.30.0070.0207.07
4.4.20.0000.0237.07
4.4.10.0030.0207.07
4.4.00.0030.0377.07
4.3.110.0000.0237.07
4.3.100.0070.0177.07
4.3.90.0030.0177.07
4.3.80.0030.0307.07
4.3.70.0030.0207.07
4.3.60.0070.0177.07
4.3.50.0100.0237.07
4.3.40.0030.0477.07
4.3.30.0030.0207.07
4.3.20.0000.0337.07
4.3.10.0030.0277.07
4.3.00.0070.01314.49