3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Base { protected static $property = 'foo'; public function method() { echo self::$property . "\n"; } } class Child extends Base { public function __construct() { Base::$property = 'bar'; } } echo "base1\n"; $base1 = new Base(); $base1->method(); echo "child\n"; $child = new Child(); $child->method(); echo "base2\n"; $base2 = new Base(); $base2->method();

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.0200.00998.97
7.3.0rc30.0170.00716.46
7.3.0beta10.0020.00712.72
7.3.0alpha10.0000.01012.76
7.2.60.0090.00616.96
7.2.00.0040.01119.46
7.1.200.0100.00315.81
7.1.100.0000.01217.86
7.1.70.0160.00816.95
7.1.60.0100.01019.82
7.1.50.0040.01816.91
7.1.00.0070.07322.27
7.0.200.0040.00816.66
7.0.140.0000.07722.09
7.0.60.0030.06019.91
7.0.50.0200.06017.88
7.0.40.0200.05320.13
7.0.30.0600.07020.23
7.0.20.0370.06320.25
7.0.10.0030.07320.33
7.0.00.0130.08020.11
5.6.280.0000.07721.11
5.6.210.0030.04320.57
5.6.200.0070.03718.14
5.6.190.0100.08020.58
5.6.180.3630.04320.61
5.6.170.0170.07320.52
5.6.160.0000.07320.54
5.6.150.0070.04018.19
5.6.140.0170.07018.18
5.6.130.0000.04718.25
5.6.120.0070.07721.10
5.6.110.0130.08020.98
5.6.100.0130.07721.01
5.6.90.0100.08020.98
5.6.80.0070.06020.38
5.6.70.4600.04020.40
5.5.350.0100.07020.34
5.5.340.0000.06018.04
5.5.330.0070.04020.36
5.5.320.0370.05020.32
5.5.310.0230.05720.25
5.5.300.0130.06317.98
5.5.290.0070.08318.04
5.5.280.0100.05720.77
5.5.270.0070.08720.77
5.5.260.0100.05320.77
5.5.250.0070.03720.70
5.5.240.0230.08320.25
5.4.450.1870.04319.53
5.4.440.1700.03319.32
5.4.430.1930.05019.52
5.4.420.1600.03719.54
5.4.410.1900.04319.16
5.4.400.1300.04019.01
5.4.390.0030.03719.09
5.4.380.0000.04019.20
5.4.370.0730.03319.00
5.4.360.1630.04719.06
5.4.350.1830.04318.88
5.4.340.1630.03719.08
5.4.320.1930.04719.13
5.4.310.1630.03719.04
5.4.300.1800.04319.21
5.4.290.1730.03718.94
5.4.280.1600.04019.22
5.4.270.1430.03719.19
5.4.260.0130.06719.05
5.4.250.0000.05319.21
5.4.240.0670.04018.96
5.4.230.1630.04019.13
5.4.220.1770.04319.16
5.4.210.1570.03319.21
5.4.200.1530.03319.30
5.4.190.1530.03718.94
5.4.180.1800.04719.21
5.4.170.1570.03318.86
5.4.160.1700.04018.97
5.4.150.1570.04719.14
5.4.140.1130.03716.38
5.4.130.1530.03316.54
5.4.120.1830.04316.57
5.4.110.1830.04316.33
5.4.100.1770.04316.59
5.4.90.1770.03716.63
5.4.80.1530.03316.59
5.4.70.1970.04716.28
5.4.60.1830.04316.23
5.4.50.1570.03716.43
5.4.40.1970.03316.51
5.4.30.1630.03316.55
5.4.20.1770.04016.53
5.4.10.1800.04316.43
5.4.00.1870.04315.95
5.3.290.1730.04014.89
5.3.280.1330.03714.82
5.3.270.0070.05014.50
5.3.260.0000.05314.72
5.3.250.0770.04014.69
5.3.240.1770.04714.61
5.3.230.1770.04014.61
5.3.220.1530.03314.72
5.3.210.1600.03014.54
5.3.200.1770.04714.65
5.3.190.1500.04314.67
5.3.180.1570.03714.50
5.3.170.1730.04014.57
5.3.160.1400.04314.68
5.3.150.1400.04714.57
5.3.140.1670.03714.53
5.3.130.0130.03714.52
5.3.120.0000.04014.62
5.3.110.0600.03714.77
5.3.100.1600.03314.02
5.3.90.1830.03713.95
5.3.80.1900.03314.12
5.3.70.1630.05014.25
5.3.60.1870.04013.92
5.3.50.1630.04314.03
5.3.40.1830.04013.96
5.3.30.1770.03314.06
5.3.20.1900.03713.70
5.3.10.1930.04313.56
5.3.00.1500.04713.56
5.2.170.0000.06711.06
5.2.160.0070.03011.07
5.2.150.0200.04311.06
5.2.140.1370.02711.16
5.2.130.1370.02711.07
5.2.120.1330.04711.02
5.2.110.1470.03011.01
5.2.100.1570.03311.20
5.2.90.1500.04011.04
5.2.80.1270.03311.07
5.2.70.1600.03011.02
5.2.60.1430.03710.96
5.2.50.1370.02710.99
5.2.40.1330.03310.90
5.2.30.1230.03311.05
5.2.20.1200.04010.87
5.2.10.0470.02311.01
5.2.00.0130.05010.63
5.1.60.0030.0239.91
5.1.50.0070.02710.09
5.1.40.0830.03710.14
5.1.30.1270.02710.31
5.1.20.1100.02310.31
5.1.10.1070.03010.13
5.1.00.1100.0279.96
5.0.50.0730.0178.68
5.0.40.0730.0208.46
5.0.30.0570.0438.23
5.0.20.0670.0208.13
5.0.10.0670.0308.06
5.0.00.0570.0278.14
4.4.90.0500.0136.88
4.4.80.0500.0176.88
4.4.70.0600.0206.88
4.4.60.0570.0176.88
4.4.50.0570.0106.88
4.4.40.0570.0306.88
4.4.30.0570.0176.88
4.4.20.0600.0206.88
4.4.10.0470.0206.88
4.4.00.0500.0236.88
4.3.110.0400.0236.88
4.3.100.0000.0176.88
4.3.90.0000.0276.88
4.3.80.0030.0206.88
4.3.70.0000.0176.88
4.3.60.0030.0236.88
4.3.50.0000.0206.88
4.3.40.0070.0336.88
4.3.30.0030.0136.88
4.3.20.0130.0176.88
4.3.10.0270.0176.88
4.3.00.0230.0176.88