3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 1; $b = array(2, 3); $arr = array(&$a, &$b[0], &$b[1]); $arr[0]++;$arr[0]++; $arr[1]++; echo $a; echo implode($b); ?>

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.1.70.0030.00917.09
7.1.60.0100.01419.24
7.1.50.0060.00617.04
7.1.00.0000.08022.44
7.0.200.0090.00316.82
7.0.140.0030.07322.22
7.0.60.0100.08019.86
7.0.50.0070.07317.86
7.0.40.0200.05020.05
7.0.30.0430.03320.13
7.0.20.0300.06720.00
7.0.10.0130.09020.30
7.0.00.0070.08320.30
5.6.280.0030.09021.13
5.6.210.0070.08720.54
5.6.200.0030.07318.16
5.6.190.0100.08720.77
5.6.180.0030.09020.33
5.6.170.0200.05320.38
5.6.160.0030.04320.31
5.6.150.0030.04018.11
5.6.140.0070.04318.17
5.6.130.0000.05318.21
5.6.120.0030.04321.14
5.6.110.0200.07021.10
5.6.100.0100.07321.00
5.6.90.0070.05321.07
5.6.80.0130.07320.33
5.5.350.0070.04320.29
5.5.340.0130.07317.99
5.5.330.0130.07020.44
5.5.320.0370.07020.20
5.5.310.0270.08020.14
5.5.300.0000.05317.98
5.5.290.0070.03717.91
5.5.280.0130.08320.77
5.5.270.0030.08720.86
5.5.260.0100.08020.88
5.5.250.0070.07720.68
5.5.240.0030.03720.11
5.4.450.0830.04719.41
5.4.440.0630.04019.45
5.4.430.0300.02719.48
5.4.420.0470.04719.25
5.4.410.0130.05718.73
5.4.400.0070.05718.73
5.4.390.0200.05318.54
5.4.380.0130.05318.64
5.4.370.0070.05718.50
5.4.360.0070.05718.74
5.4.350.0200.04318.59
5.4.340.0270.04018.68
5.4.320.0070.03912.45
5.4.310.0070.03712.45
5.4.300.0070.04012.45
5.4.290.0060.03712.45
5.4.280.0090.03212.34
5.4.270.0060.03912.34
5.4.260.0070.04612.34
5.4.250.0060.05412.35
5.4.240.0050.03612.34
5.4.230.0100.03412.34
5.4.220.0030.03912.34
5.4.210.0060.03512.34
5.4.200.0070.03712.34
5.4.190.0130.04712.34
5.4.180.0160.04312.34
5.4.170.0140.04312.34
5.4.160.0140.04612.34
5.4.150.0210.04312.34
5.4.140.0210.03912.02
5.4.130.0330.08912.01
5.4.120.0140.04411.96
5.4.110.0170.03911.96
5.4.100.0130.04411.96
5.4.90.0190.03811.96
5.4.80.0130.04311.96
5.4.70.0160.04111.95
5.4.60.0140.04111.95
5.4.50.0130.04311.96
5.4.40.0120.04411.95
5.4.30.0240.06411.94
5.4.20.0160.04011.94
5.4.10.0290.05611.94
5.4.00.0180.03911.43
5.3.290.0070.03912.80
5.3.280.0040.04012.71
5.3.270.0150.04812.72
5.3.260.0130.04712.72
5.3.250.0170.04212.72
5.3.240.0170.04212.72
5.3.230.0120.04912.70
5.3.220.0160.04312.68
5.3.210.0170.04312.68
5.3.200.0220.06712.68
5.3.190.0170.04312.68
5.3.180.0140.04512.67
5.3.170.0180.04112.67
5.3.160.0160.04312.67
5.3.150.0110.04812.68
5.3.140.0110.04812.66
5.3.130.0180.04112.66
5.3.120.0150.04512.66
5.3.110.0220.03812.66
5.3.100.0130.04712.12
5.3.90.0150.04612.08
5.3.80.0190.04112.08
5.3.70.0130.04612.07
5.3.60.0180.04612.06
5.3.50.0160.04312.00
5.3.40.0290.09312.00
5.3.30.0180.04411.95
5.3.20.0200.04411.73
5.3.10.0230.03311.69
5.3.00.0160.04111.68
5.2.170.0110.0369.18
5.2.160.0230.0549.18
5.2.150.0120.0359.18
5.2.140.0100.0379.18
5.2.130.0080.0399.14
5.2.120.0300.0499.14
5.2.110.0180.0319.15
5.2.100.0170.0339.14
5.2.90.0140.0329.14
5.2.80.0140.0339.13
5.2.70.0100.0389.13
5.2.60.0140.0329.09
5.2.50.0110.0369.06
5.2.40.0180.0619.04
5.2.30.0140.0329.00
5.2.20.0140.0349.00
5.2.10.0110.0358.93
5.2.00.0100.0358.79
5.1.60.0080.0338.08
5.1.50.0170.0558.07
5.1.40.0130.0288.06
5.1.30.0080.0358.40
5.1.20.0100.0338.43
5.1.10.0160.0268.15
5.1.00.0100.0318.15
5.0.50.0090.0256.63
5.0.40.0070.0266.48
5.0.30.0080.0376.30
5.0.20.0040.0286.27
5.0.10.0110.0206.25
5.0.00.0080.0376.24
4.4.90.0110.0164.78
4.4.80.0090.0164.75
4.4.70.0070.0184.76
4.4.60.0070.0194.75
4.4.50.0070.0184.77
4.4.40.0070.0294.71
4.4.30.0050.0224.76
4.4.20.0080.0174.84
4.4.10.0060.0194.85
4.4.00.0060.0314.75
4.3.110.0110.0144.67
4.3.100.0070.0204.66
4.3.90.0090.0154.63
4.3.80.0040.0314.59
4.3.70.0050.0194.63
4.3.60.0060.0184.63
4.3.50.0050.0204.63
4.3.40.0070.0284.54
4.3.30.0050.0203.29
4.3.20.0040.0193.27
4.3.10.0060.0173.23
4.3.00.0170.01713.34