3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = array (0 ,1); next($x); $y = $x; echo "a".current($x); next($x); $z = $x; echo "b".current($z); // * echo "c".current($x); ?>

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.0070.00716.65
7.2.00.0040.01219.14
7.1.200.0060.00615.80
7.1.70.0050.01016.80
7.1.60.0100.00517.15
7.1.50.0050.01616.77
7.1.40.0040.01516.27
7.1.30.0000.01716.61
7.1.20.0100.00516.70
7.1.10.0090.00316.52
7.1.00.0060.00316.60
7.0.200.0080.00416.91
7.0.190.0040.00816.59
7.0.180.0120.00016.33
7.0.170.0050.00716.24
7.0.160.0110.00316.23
7.0.150.0090.00416.26
7.0.140.0040.00716.26
7.0.130.0090.00416.34
7.0.120.0060.00616.26
7.0.110.0100.00316.45
7.0.100.0080.00816.13
7.0.90.0000.01316.29
7.0.80.0060.00616.38
7.0.70.0060.00616.15
7.0.60.0070.01016.18
7.0.50.0000.01616.34
7.0.40.0060.00915.30
7.0.30.0090.00515.30
7.0.20.0000.01115.30
7.0.10.0100.00615.30
7.0.00.0030.00715.30
hhvm-3.17.30.0500.083100.23
hhvm-3.15.40.0350.09897.37
hhvm-3.13.20.0260.105101.71
hhvm-3.12.140.0500.083102.46
hhvm-3.11.10.0270.13499.01
hhvm-3.10.10.0260.09095.42
5.6.300.0100.04120.88
5.6.290.0060.04120.89
5.6.280.0030.04920.85
5.6.270.0070.05021.02
5.6.260.0040.05820.86
5.6.250.0130.04020.81
5.6.240.0090.04320.92
5.6.230.0000.04920.96
5.6.220.0060.06420.93
5.6.210.0100.04820.94
5.6.200.0030.05220.92
5.6.190.0000.04720.73
5.6.180.0000.09120.82
5.6.170.0060.04320.81
5.6.160.0000.05820.95
5.6.150.0100.04920.98
5.6.140.0070.04720.94
5.6.130.0000.05120.97
5.6.120.0130.07021.04
5.6.110.0100.03821.03
5.6.100.0040.04721.02
5.6.90.0060.04420.90
5.6.80.0150.03520.27
5.6.70.0070.04020.34
5.6.60.0080.03820.18
5.6.50.0130.03620.22
5.6.40.0030.05220.28
5.6.30.0000.05920.16
5.6.20.0100.04220.17
5.6.10.0030.04720.14
5.6.00.0030.04120.32
5.5.380.0040.05017.50
5.5.370.0030.04017.46
5.5.360.0000.06017.60
5.5.350.0030.04317.46
5.5.340.0030.04317.96
5.5.330.0000.07518.03
5.5.320.0030.05617.94
5.5.310.0090.03917.84
5.5.300.0060.04117.94
5.5.290.0180.02717.74
5.5.280.0030.07417.98
5.5.270.0070.04018.01
5.5.260.0060.04818.02
5.5.250.0160.03617.84
5.5.240.0030.04317.22
5.5.230.0090.03817.39
5.5.220.0000.04517.40
5.5.210.0000.04817.35
5.5.200.0000.04317.30
5.5.190.0130.05317.25
5.5.180.0070.03617.32
5.5.160.0000.04217.39
5.5.150.0070.03717.41
5.5.140.0070.03917.37
5.5.130.0060.03517.05
5.5.120.0030.04617.37
5.5.110.0000.04117.31
5.5.100.0000.04716.95
5.5.90.0040.04017.24
5.5.80.0000.04316.99
5.5.70.0070.03816.86
5.5.60.0070.04417.05
5.5.50.0100.08517.22
5.5.40.0100.04817.25
5.5.30.0030.04017.18
5.5.20.0090.04017.23
5.5.10.0070.04016.96
5.5.00.0070.03716.92
5.4.450.0060.04519.41
5.4.440.0070.04819.41
5.4.430.0030.04019.29
5.4.420.0040.03919.28
5.4.410.0030.05019.27
5.4.400.0130.04918.87
5.4.390.0030.04819.02
5.4.380.0030.04119.03
5.4.370.0000.04819.04
5.4.360.0070.03618.90
5.4.350.0030.03819.05
5.4.340.0090.03418.96
5.4.320.0100.03418.81
5.4.310.0030.04218.98
5.4.300.0030.04519.11
5.4.290.0030.03819.03
5.4.280.0100.03418.86
5.4.270.0030.04518.94
5.4.260.0100.04919.00
5.4.250.0110.03918.72
5.4.240.0190.04018.83
5.4.230.0120.04418.73
5.4.220.0070.04019.02
5.4.210.0000.04519.07
5.4.200.0030.04219.15
5.4.190.0110.04019.07
5.4.180.0030.04419.05
5.4.170.0060.03618.88
5.4.160.0060.03518.96
5.4.150.0060.03718.98
5.4.140.0070.03316.36
5.4.130.0030.05516.53
5.4.120.0100.06416.47
5.4.110.0060.03416.43
5.4.100.0030.03916.57
5.4.90.0090.03616.43
5.4.80.0030.04016.48
5.4.70.0100.03216.55
5.4.60.0030.04716.32
5.4.50.0000.04416.32
5.4.40.0000.08116.69
5.4.30.0000.05916.44
5.4.20.0000.03816.63
5.4.10.0000.03916.52
5.4.00.0070.03315.97
5.3.290.0030.04115.30
5.3.280.0090.03414.65
5.3.270.0030.03814.65
5.3.260.0030.03814.77
5.3.250.0030.04014.65
5.3.240.0070.04514.75
5.3.230.0000.05514.65
5.3.220.0030.03814.71
5.3.210.0040.04314.65
5.3.200.0030.03914.65
5.3.190.0000.04514.78
5.3.180.0000.04214.65
5.3.170.0030.03614.65
5.3.160.0030.05514.65
5.3.150.0070.03614.69
5.3.140.0030.04614.78
5.3.130.0030.03714.70
5.3.120.0090.03614.76
5.3.110.0070.04914.67
5.3.100.0030.03914.65
5.3.90.0040.03714.65
5.3.80.0000.03914.65
5.3.70.0040.03714.65
5.3.60.0030.03914.65
5.3.50.0060.03514.65
5.3.40.0060.03214.65
5.3.30.0030.03514.65
5.3.20.0030.03514.65
5.3.10.0040.03614.65
5.3.00.0030.03814.65
5.2.170.0000.04414.65
5.2.160.0070.03614.65
5.2.150.0060.02514.65
5.2.140.0000.03114.65
5.2.130.0060.02414.65
5.2.120.0030.02814.65
5.2.110.0030.03014.65
5.2.100.0060.02814.65
5.2.90.0060.02414.65
5.2.80.0070.02614.65
5.2.70.0060.03414.65
5.2.60.0030.02914.65
5.2.50.0000.03714.65
5.2.40.0040.02714.65
5.2.30.0030.03114.65
5.2.20.0000.03314.65
5.2.10.0070.02914.65
5.2.00.0030.02814.65
5.1.60.0030.02414.65
5.1.50.0000.02814.65
5.1.40.0000.03214.65
5.1.30.0060.04714.65
5.1.20.0070.02214.65
5.1.10.0060.02414.65
5.1.00.0000.02714.65
5.0.50.0000.02314.65
5.0.40.0000.02514.65
5.0.30.0030.03114.65
5.0.20.0000.02214.65
5.0.10.0000.02514.65
5.0.00.0070.02814.65
4.4.90.0060.01114.65
4.4.80.0030.01714.65
4.4.70.0030.01414.65
4.4.60.0000.01814.65
4.4.50.0000.02014.65
4.4.40.0030.02214.65
4.4.30.0000.01814.65
4.4.20.0070.01014.65
4.4.10.0030.01614.65
4.4.00.0000.02714.65
4.3.110.0030.01514.65
4.3.100.0000.01714.65
4.3.90.0000.01714.65
4.3.80.0000.03014.65
4.3.70.0040.01214.65
4.3.60.0000.01814.65
4.3.50.0000.01914.65
4.3.40.0000.04614.65
4.3.30.0040.01514.65
4.3.20.0090.02014.65
4.3.10.0030.03514.65
4.3.00.0000.03214.65