3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function example() { echo "I am the original function A::example().<br />\n"; } } class B extends A { function example() { echo "I am the redefined function B::example().<br />\n"; A::example(); } } // there is no object of class A. // this will print // I am the original function A::example().<br /> A::example(); // create an object of class B. $b = new B; // this will print // I am the redefined function B::example().<br /> // I am the original function A::example().<br /> $b->example();

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.0170.00398.97
7.3.0rc30.0200.00616.33
7.3.0beta10.0030.00712.46
7.3.0alpha10.0040.00412.65
7.2.60.0040.00716.61
7.2.00.0060.00619.33
7.1.200.0060.00815.36
7.1.100.0000.01218.06
7.1.70.0000.01017.11
7.1.60.0040.01519.70
7.1.50.0130.00916.65
7.1.00.0000.08022.45
7.0.200.0060.00916.72
7.0.140.0070.06322.15
7.0.60.0170.03020.08
7.0.50.0030.04717.89
7.0.40.0100.08020.07
7.0.30.0630.06020.23
7.0.20.0300.06720.20
7.0.10.0330.05720.25
7.0.00.0100.08720.16
5.6.280.0070.07021.09
5.6.210.0130.07720.51
5.6.200.0200.05318.19
5.6.190.0130.07320.63
5.6.180.0230.08020.60
5.6.170.0330.07320.47
5.6.160.0100.08320.43
5.6.150.0070.09018.16
5.6.140.0070.07718.11
5.6.130.0100.08318.24
5.6.120.0100.08721.08
5.6.110.0030.05321.01
5.6.100.0030.08321.08
5.6.90.0200.07021.10
5.6.80.0070.07720.39
5.6.70.0230.07320.38
5.5.350.0170.06720.39
5.5.340.0100.04718.05
5.5.330.0030.04320.28
5.5.320.0130.05320.22
5.5.310.0330.06720.41
5.5.300.0000.04017.96
5.5.290.0100.04017.94
5.5.280.0030.04320.89
5.5.270.0030.06720.88
5.5.260.0130.05720.87
5.5.250.0200.07020.55
5.5.240.0100.03720.15
5.4.450.0730.05319.63
5.4.440.0770.06319.48
5.4.430.0070.05719.30
5.4.420.0670.00019.52
5.4.410.0200.06718.96
5.4.400.0300.05318.89
5.4.390.0230.05318.62
5.4.380.0270.05318.50
5.4.370.0100.03718.68
5.4.360.0170.03718.72
5.4.350.0070.06612.02
5.4.340.0090.04612.02
5.4.320.0050.03912.50
5.4.310.0070.03712.50
5.4.300.0090.03412.50
5.4.290.0040.04012.50
5.4.280.0060.03512.39
5.4.270.0040.03912.39
5.4.260.0060.05112.40
5.4.250.0080.04512.39
5.4.240.0050.03712.39
5.4.230.0070.03712.39
5.4.220.0050.04212.38
5.4.210.0070.03612.39
5.4.200.0060.03812.39
5.4.190.0070.03712.38
5.4.180.0060.03612.38
5.4.170.0020.04012.39
5.4.160.0080.03812.39
5.4.150.0060.03612.39
5.4.140.0030.04012.07
5.4.130.0050.04112.06
5.4.120.0070.03812.02
5.4.110.0050.03712.01
5.4.100.0070.03812.01
5.4.90.0060.03812.02
5.4.80.0060.03712.01
5.4.70.0100.03712.01
5.4.60.0080.03912.01
5.4.50.0090.03912.01
5.4.40.0050.03611.99
5.4.30.0040.03711.99
5.4.20.0080.03412.00
5.4.10.0050.04411.99
5.4.00.0090.03411.48
5.3.290.0040.04112.80
5.3.280.0060.04012.71
5.3.270.0090.03812.72
5.3.260.0110.04512.72
5.3.250.0080.05212.72
5.3.240.0060.05412.71
5.3.230.0050.03912.71
5.3.220.0060.03712.68
5.3.210.0050.04212.68
5.3.200.0110.03312.68
5.3.190.0090.04612.68
5.3.180.0060.03812.67
5.3.170.0030.04012.67
5.3.160.0070.03512.67
5.3.150.0040.04712.67
5.3.140.0070.03612.66
5.3.130.0070.03912.66
5.3.120.0070.04212.66
5.3.110.0120.04412.66
5.3.100.0070.04712.12
5.3.90.0060.03812.11
5.3.80.0090.04312.10
5.3.70.0080.03612.10
5.3.60.0070.03712.07
5.3.50.0110.04412.03
5.3.40.0060.03612.03
5.3.30.0070.03611.98
5.3.20.0070.03611.76
5.3.10.0060.03411.73
5.3.00.0060.03611.72
5.2.170.0060.0309.22
5.2.160.0010.0339.23
5.2.150.0030.0349.22
5.2.140.0050.0319.22
5.2.130.0070.0369.18
5.2.120.0050.0319.18
5.2.110.0050.0309.19
5.2.100.0050.0329.18
5.2.90.0070.0289.18
5.2.80.0050.0319.17
5.2.70.0040.0339.18
5.2.60.0070.0289.13
5.2.50.0050.0299.09
5.2.40.0070.0269.08
5.2.30.0070.0279.05
5.2.20.0030.0319.04
5.2.10.0050.0288.94
5.2.00.0030.0318.81
5.1.60.0040.0258.09
5.1.50.0020.0278.09
5.1.40.0030.0258.07
5.1.30.0040.0268.42
5.1.20.0050.0268.43
5.1.10.0030.0268.17
5.1.00.0020.0308.17
5.0.50.0050.0206.64
5.0.40.0040.0186.50
5.0.30.0020.0326.32
5.0.20.0040.0226.28
5.0.10.0030.0206.27
5.0.00.0040.0306.26
4.4.90.0020.0174.78
4.4.80.0030.0224.76
4.4.70.0020.0164.75
4.4.60.0050.0214.75
4.4.50.0040.0144.77
4.4.40.0020.0254.70
4.4.30.0050.0144.76
4.4.20.0040.0164.84
4.4.10.0020.0174.84
4.4.00.0040.0234.76
4.3.110.0030.0154.67
4.3.100.0020.0154.66
4.3.90.0030.0244.64
4.3.80.0030.0304.58
4.3.70.0030.0144.63
4.3.60.0030.0174.63
4.3.50.0010.0174.63
4.3.40.0030.0244.54
4.3.30.0010.0173.30
4.3.20.0010.0173.28
4.3.10.0020.0163.24
4.3.00.0070.0237.72