3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { function __construct() { $this->a = "hello"; $this->b = "hi"; $this->val = "howdy"; $val = "a"; echo $this->{$val}; // outputs "hello" echo "\n"; $val = "b"; echo $this->{$val}; // outputs "hi" echo "\n"; echo $this->val; //outputs "howdy" echo "\n"; echo $this->{"val"}; } } $foo = new foo();

Here you find the average performance (time & memory) of each version. A greyed 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.00.0090.00619.10
7.1.100.0060.00617.88
7.1.70.0100.00317.23
7.1.60.0030.00716.86
7.1.50.0040.00716.95
7.1.40.0070.00416.80
7.1.30.0090.00616.80
7.1.20.0060.00916.80
7.1.10.0030.00616.80
7.1.00.0040.00416.80
7.0.200.0000.00716.87
7.0.190.0000.00716.80
7.0.180.0060.00916.80
7.0.170.0000.00716.80
7.0.160.0030.00716.80
7.0.150.0060.01016.80
7.0.140.0030.00516.80
7.0.130.0000.00716.80
7.0.120.0050.00316.80
7.0.110.0000.00916.80
7.0.100.0000.00816.80
7.0.90.0000.01016.80
7.0.80.0040.01116.80
7.0.70.0070.00716.80
7.0.60.0000.00916.80
7.0.50.0030.00516.80
7.0.40.0040.00416.80
7.0.30.0040.00416.80
7.0.20.0040.00416.80
7.0.10.0070.00316.80
7.0.00.0040.00416.80
hhvm-3.17.30.0210.08998.57
hhvm-3.15.40.0310.07897.42
hhvm-3.13.20.0230.093109.52
hhvm-3.12.140.0240.081114.54
hhvm-3.11.10.0230.087106.68
hhvm-3.10.10.0070.095103.55
5.6.300.0070.05420.82
5.6.290.0070.04220.74
5.6.280.0070.04120.98
5.6.270.0030.05020.91
5.6.260.0070.04321.04
5.6.250.0060.04520.97
5.6.240.0100.07520.97
5.6.230.0030.08320.84
5.6.220.0070.07920.96
5.6.210.0030.04420.61
5.6.200.0000.05020.88
5.6.190.0060.04220.96
5.6.180.0000.04720.87
5.6.170.0060.03820.99
5.6.160.0170.07921.05
5.6.150.0060.03820.99
5.6.140.0030.04320.85
5.6.130.0070.03720.83
5.6.120.0070.05620.95
5.6.110.0030.04020.98
5.6.100.0030.04320.98
5.6.90.0070.07520.82
5.6.80.0030.08120.41
5.6.70.0070.06820.40
5.6.60.0000.04520.20
5.6.50.0030.07220.40
5.6.40.0030.08320.23
5.6.30.0030.05620.35
5.6.20.0070.04420.27
5.6.10.0030.04720.20
5.6.00.0030.04020.16
5.5.380.0030.04817.52
5.5.370.0030.08317.54
5.5.360.0030.04417.47
5.5.350.0000.04817.47
5.5.340.0030.04218.18
5.5.330.0000.04718.15
5.5.320.0000.04717.87
5.5.310.0030.04818.09
5.5.300.0000.05418.09
5.5.290.0100.04018.18
5.5.280.0070.04018.00
5.5.270.0070.04217.85
5.5.260.0030.05917.95
5.5.250.0000.06217.93
5.5.240.0070.07017.13
5.5.230.0030.03917.41
5.5.220.0030.03817.50
5.5.210.0000.07117.47
5.5.200.0030.06317.05
5.5.190.0000.04517.39
5.5.180.0100.03317.19
5.5.160.0030.06717.48
5.5.150.0200.03717.44
5.5.140.0000.04517.41
5.5.130.0070.05317.40
5.5.120.0070.04017.48
5.5.110.0060.03617.44
5.5.100.0070.07317.13
5.5.90.0070.04017.09
5.5.80.0000.04417.31
5.5.70.0000.04217.33
5.5.60.0000.04017.43
5.5.50.0030.03816.98
5.5.40.0000.05017.25
5.5.30.0030.04017.30
5.5.20.0030.04117.10
5.5.10.0030.03917.41
5.5.00.0060.03917.41
5.4.450.0070.07819.54
5.4.440.0030.05819.38
5.4.430.0030.03719.48
5.4.420.0030.07119.27
5.4.410.0030.07919.36
5.4.400.0070.07919.08
5.4.390.0030.04218.91
5.4.380.0030.05019.20
5.4.370.0030.07819.06
5.4.360.0030.03718.95
5.4.350.0030.03818.92
5.4.340.0030.04419.15
5.4.320.0000.06718.98
5.4.310.0040.03919.08
5.4.300.0000.04219.20
5.4.290.0000.08418.98
5.4.280.0100.05119.20
5.4.270.0170.03019.20
5.4.260.0030.08219.20
5.4.250.0000.04319.13
5.4.240.0040.03919.07
5.4.230.0030.06719.15
5.4.220.0030.04419.23
5.4.210.0100.05418.88
5.4.200.0030.04118.97
5.4.190.0000.04419.22
5.4.180.0030.03918.88
5.4.170.0000.04419.07
5.4.160.0060.03519.11
5.4.150.0070.07319.18
5.4.140.0100.03016.80
5.4.130.0060.03216.80
5.4.120.0100.06916.80
5.4.110.0130.04416.80
5.4.100.0030.06016.80
5.4.90.0030.06116.80
5.4.80.0070.03616.80
5.4.70.0060.03516.80
5.4.60.0100.03216.80
5.4.50.0030.03816.80
5.4.40.0130.03716.80
5.4.30.0030.03416.80
5.4.20.0060.03216.80
5.4.10.0000.03816.80
5.4.00.0070.07616.80
5.3.290.0000.04416.80
5.3.280.0040.03516.80
5.3.270.0030.04016.80
5.3.260.0070.07216.80
5.3.250.0000.08316.80
5.3.240.0000.03716.80
5.3.230.0100.06416.80
5.3.220.0070.06116.80
5.3.210.0100.03216.80
5.3.200.0070.07116.80
5.3.190.0030.06116.80
5.3.180.0070.06116.80
5.3.170.0060.03816.80
5.3.160.0030.04016.80
5.3.150.0000.04516.80
5.3.140.0190.03616.80
5.3.130.0000.04616.80
5.3.120.0100.04616.80
5.3.110.0070.03316.80
5.3.100.0100.03416.80
5.3.90.0030.04016.80
5.3.80.0030.05016.80
5.3.70.0100.03516.80
5.3.60.0000.03716.80
5.3.50.0000.05016.80
5.3.40.0060.06116.80
5.3.30.0030.03916.80
5.3.20.0040.03216.80
5.3.10.0000.03616.80
5.3.00.0030.03816.80
5.2.170.0000.04516.80
5.2.160.0030.05016.80
5.2.150.0000.03416.80
5.2.140.0000.03416.80
5.2.130.0070.04616.80
5.2.120.0030.02716.80
5.2.110.0100.02616.80
5.2.100.0030.02916.80
5.2.90.0070.02716.80
5.2.80.0070.02716.80
5.2.70.0100.04016.80
5.2.60.0030.02916.80
5.2.50.0140.02416.80
5.2.40.0000.03116.80
5.2.30.0070.05016.80
5.2.20.0070.03016.80
5.2.10.0030.02916.80
5.2.00.0070.02416.80
5.1.60.0030.02316.80
5.1.50.0000.02916.80
5.1.40.0030.02316.80
5.1.30.0070.02516.80
5.1.20.0030.05716.80
5.1.10.0000.02916.80
5.1.00.0100.04716.80
5.0.50.0060.03216.80
5.0.40.0030.02816.80
5.0.30.0000.03616.80
5.0.20.0100.03516.80
5.0.10.0030.04616.80
5.0.00.0030.06116.80
4.4.90.0000.01816.80
4.4.80.0000.01916.80
4.4.70.0030.01316.80
4.4.60.0000.01716.80
4.4.50.0030.01316.80
4.4.40.0000.04616.80
4.4.30.0040.02516.80
4.4.20.0000.02616.80
4.4.10.0030.03616.80
4.4.00.0070.02416.80
4.3.110.0000.04016.80
4.3.100.0060.01216.80
4.3.90.0000.02716.80
4.3.80.0060.04116.80
4.3.70.0070.01316.80
4.3.60.0000.01616.80
4.3.50.0000.01916.80
4.3.40.0030.04416.80
4.3.30.0000.01816.80
4.3.20.0000.01816.80
4.3.10.0030.01916.80
4.3.00.0030.03716.80