3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public $bar = 'A'; public function doSomething() { $this->bar = 'B'; yield; } } $foo = new Foo(); echo $foo->bar . PHP_EOL; $i = $foo->doSomething(); echo $foo->bar . PHP_EOL; print_r($i);
based on UrY1t

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.3.0rc40.0140.00698.97
7.3.0rc30.0240.00916.67
7.3.0beta10.0130.00312.73
7.3.0alpha10.0030.00312.75
7.2.60.0040.01116.81
7.2.50.0260.00416.61
7.1.200.0070.00715.73
7.1.70.0050.00516.84
7.1.60.0100.01319.46
7.1.50.0000.01016.70
7.1.00.0070.07022.54
7.0.200.0000.00716.63
7.0.140.0030.07021.95
7.0.60.0100.03319.96
7.0.50.0070.07317.79
7.0.40.0070.06719.96
7.0.30.0230.03720.31
7.0.20.0230.08320.26
7.0.10.0230.06720.07
7.0.00.0030.04320.23
5.6.280.0100.06720.79
5.6.210.0030.08320.73
5.6.200.0130.06318.16
5.6.190.0070.05020.57
5.6.180.0130.04720.77
5.6.170.0300.07720.50
5.6.160.0000.09320.61
5.6.150.0070.03718.17
5.6.140.0030.05718.15
5.6.130.0170.06318.17
5.6.120.0100.05721.01
5.6.110.0230.06321.02
5.6.100.0100.07720.98
5.6.90.0030.04321.13
5.6.80.0100.04720.45
5.6.70.4600.03720.38
5.5.350.0230.07720.49
5.5.340.0070.03718.07
5.5.330.0070.08320.57
5.5.320.0270.08320.30
5.5.310.0270.07720.37
5.5.300.0100.05018.01
5.5.290.0100.07317.95
5.5.280.0000.04720.77
5.5.270.0070.08020.68
5.5.260.0070.05020.73
5.5.250.0170.07020.63
5.5.240.3030.04020.09
5.4.450.0100.05019.46
5.4.440.0330.04019.52
5.4.430.0070.05019.51
5.4.420.0070.05019.54
5.4.410.0100.04019.33
5.4.400.0130.03718.98
5.4.390.0170.04019.16
5.4.380.0470.04718.71
5.4.370.0330.05318.61
5.4.360.0370.05018.71
5.4.350.0400.05718.82
5.4.340.0300.06018.69
5.4.320.0040.04312.50
5.4.310.0080.04112.50
5.4.300.0090.04612.50
5.4.290.0080.04012.50
5.4.280.0070.03812.40
5.4.270.0030.04012.39
5.4.260.0100.03712.39
5.4.250.0070.04412.39
5.4.240.0070.03812.39
5.4.230.0050.04312.39
5.4.220.0060.03412.39
5.4.210.0080.03212.39
5.4.200.0080.04412.39
5.4.190.0060.03812.38
5.4.180.0060.03912.38
5.4.170.0090.03812.39
5.4.160.0030.03812.39
5.4.150.0060.03412.39
5.4.140.0050.03712.07
5.4.130.0090.03712.06
5.4.120.0060.03512.02
5.4.110.0070.03312.01
5.4.100.0060.04512.01
5.4.90.0050.03712.02
5.4.80.0050.03612.02
5.4.70.0050.04012.01
5.4.60.0060.03712.01
5.4.50.0080.03312.01
5.4.40.0110.03712.00
5.4.30.0050.04111.99
5.4.20.0040.03812.00
5.4.10.0070.03511.99
5.4.00.0070.03411.48
5.3.290.0080.04312.80
5.3.280.0120.03712.71
5.3.270.0060.04412.72
5.3.260.0110.05012.72
5.3.250.0090.03512.72
5.3.240.0030.04012.72
5.3.230.0060.03812.71
5.3.220.0080.03512.68
5.3.210.0070.03712.68
5.3.200.0100.03612.68
5.3.190.0100.03312.68
5.3.180.0090.03212.68
5.3.170.0110.03912.67
5.3.160.0040.03812.67
5.3.150.0080.03412.67
5.3.140.0030.04412.66
5.3.130.0110.03512.66
5.3.120.0060.05212.66
5.3.110.0050.04012.66
5.3.100.0070.04512.11
5.3.90.0140.04312.09
5.3.80.0080.03312.09
5.3.70.0050.04112.09
5.3.60.0060.03512.07
5.3.50.0050.03712.03
5.3.40.0040.03812.02
5.3.30.0070.03611.98
5.3.20.0080.03211.77
5.3.10.0060.03611.73
5.3.00.0030.04411.71
5.2.170.0130.0289.22
5.2.160.0060.0309.22
5.2.150.0040.0319.22
5.2.140.0050.0309.21
5.2.130.0070.0269.18
5.2.120.0060.0319.18
5.2.110.0050.0289.19
5.2.100.0020.0339.18
5.2.90.0030.0299.18
5.2.80.0080.0289.17
5.2.70.0030.0319.18
5.2.60.0050.0299.12
5.2.50.0050.0299.09
5.2.40.0020.0319.07
5.2.30.0050.0289.05
5.2.20.0030.0299.04
5.2.10.0070.0318.94
5.2.00.0050.0308.80
5.1.60.0090.0298.09
5.1.50.0050.0308.08
5.1.40.0030.0258.07
5.1.30.0060.0248.41
5.1.20.0040.0278.44
5.1.10.0060.0248.16
5.1.00.0060.0248.16
5.0.50.0070.0176.64
5.0.40.0070.0156.50
5.0.30.0030.0326.31
5.0.20.0050.0196.27
5.0.10.0070.0256.25
5.0.00.0080.0356.25
4.4.90.0020.0234.78
4.4.80.0070.0164.75
4.4.70.0020.0174.75
4.4.60.0030.0154.76
4.4.50.0020.0184.77
4.4.40.0030.0254.71
4.4.30.0030.0154.75
4.4.20.0020.0184.85
4.4.10.0010.0174.85
4.4.00.0050.0234.76
4.3.110.0020.0164.67
4.3.100.0040.0134.66
4.3.90.0020.0144.64
4.3.80.0030.0234.58
4.3.70.0030.0184.63
4.3.60.0040.0194.63
4.3.50.0050.0164.63
4.3.40.0060.0254.54
4.3.30.0030.0143.30
4.3.20.0030.0203.28
4.3.10.0010.0163.24
4.3.00.0030.01314.87