3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($var) { $GLOBALS['a']++; //$var++; debug_zval_dump($var); //$GLOBALS['var']++; echo $var; echo $GLOBALS['a']; // echo $GLOBALS['var']; } $a = 0; $GLOBALS['a']++; debug_zval_dump($a); test($a); echo $GLOBALS['a']; echo $a;

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.0080.00616.84
7.2.00.0030.01319.39
7.1.200.0070.00715.87
7.1.100.0000.02218.07
7.1.70.0030.00317.13
7.1.60.0100.01619.82
7.1.50.0080.00417.03
7.1.00.0030.07722.33
7.0.200.0040.00416.93
7.0.140.0030.07322.19
7.0.110.0130.06020.07
7.0.100.0470.04020.13
7.0.90.0470.04019.98
7.0.80.0230.05719.84
7.0.70.0300.04719.93
7.0.60.0570.03019.87
7.0.50.0430.04019.96
7.0.40.0070.07319.66
7.0.30.0100.04019.78
7.0.20.0100.07019.75
7.0.10.0100.08319.77
7.0.00.0000.05719.71
5.6.280.0100.06720.86
5.6.260.0070.08020.60
5.6.250.0100.04020.64
5.6.240.0100.03320.65
5.6.230.0000.04720.57
5.6.220.0100.07020.85
5.6.210.0030.09020.55
5.6.200.0000.05020.62
5.6.190.0130.06720.57
5.6.180.0000.06720.66
5.6.170.0200.08020.70
5.6.160.0000.04020.56
5.6.150.0100.06320.86
5.6.140.0070.06320.55
5.6.130.0030.06720.56
5.6.120.0130.06720.46
5.6.110.0100.07320.54
5.6.100.0100.04020.64
5.6.90.0070.07320.57
5.6.80.0100.04719.97
5.6.70.0000.04319.84
5.6.60.0100.03320.02
5.6.50.0100.03720.09
5.6.40.0100.03319.95
5.6.30.0100.04720.00
5.6.20.0070.03320.21
5.6.10.0070.03719.93
5.6.00.0030.05019.91
5.5.380.0000.04317.64
5.5.370.0070.03717.57
5.5.360.0030.06717.68
5.5.350.0030.04017.66
5.5.340.0100.03018.05
5.5.330.0070.04717.82
5.5.320.0000.04018.07
5.5.310.0030.08018.13
5.5.300.0070.06717.94
5.5.290.0030.08717.91
5.5.280.0170.03318.07
5.5.270.0070.07318.12
5.5.260.0030.04717.93
5.5.250.0030.06017.94
5.5.240.0000.04717.49
5.5.230.0100.03017.47
5.5.220.0030.08017.61
5.5.210.0030.04317.47
5.5.200.0070.05717.27
5.5.190.0070.08717.48
5.5.180.0000.03717.48
5.5.160.0130.02717.44
5.5.150.0070.03317.42
5.5.140.0000.04017.45
5.5.130.0030.04017.28
5.5.120.0000.03317.58
5.5.110.0070.04317.41
5.5.100.0030.05317.19
5.5.90.0070.04317.34
5.5.80.0030.03717.50
5.5.70.0030.04317.29
5.5.60.0070.06017.38
5.5.50.0000.04017.45
5.5.40.0130.05317.36
5.5.30.0030.07017.16
5.5.20.0000.04017.16
5.5.10.0100.07017.29
5.5.00.0030.06717.32
5.4.450.0030.08019.36
5.4.440.0030.08019.32
5.4.430.0100.07319.66
5.4.420.0100.07319.55
5.4.410.0100.05719.20
5.4.400.0000.04319.04
5.4.390.0000.04019.35
5.4.380.0030.04018.95
5.4.370.0070.06019.02
5.4.360.0070.05718.99
5.4.350.0000.06019.00
5.4.340.0070.04019.14
5.4.320.0000.04019.22
5.4.310.0070.03719.09
5.4.300.0000.04018.98
5.4.290.0030.05019.01
5.4.280.0070.02719.33
5.4.270.0070.03319.14
5.4.260.0030.04319.26
5.4.250.0100.03019.34
5.4.240.0000.08019.30
5.4.230.0000.03319.33
5.4.220.0000.05018.99
5.4.210.0100.03019.00
5.4.200.0000.04019.24
5.4.190.0000.05019.17
5.4.180.0000.06318.97
5.4.170.0100.06318.95
5.4.160.0030.03319.22
5.4.150.0030.05719.21
5.4.140.0070.06716.53
5.4.130.0030.07016.53
5.4.120.0100.06716.35
5.4.110.0100.05716.46
5.4.100.0000.06716.47
5.4.90.0000.04316.41
5.4.80.0030.06716.55
5.4.70.0030.03716.55
5.4.60.0100.05716.40
5.4.50.0130.04316.47
5.4.40.0000.04016.28
5.4.30.0100.06716.38
5.4.20.0100.07016.53
5.4.10.0130.06716.52
5.4.00.0100.04715.83
5.3.290.0000.03714.66
5.3.280.0070.03314.61
5.3.270.0100.03014.64
5.3.260.0030.06714.61
5.3.250.0030.04314.60
5.3.240.0070.03314.63
5.3.230.0100.05014.59
5.3.220.0100.06314.55
5.3.210.0030.05014.42
5.3.200.0070.06314.59
5.3.190.0130.06714.64
5.3.180.0070.06314.58
5.3.170.0030.05014.69
5.3.160.0170.03314.57
5.3.150.0070.07314.59
5.3.140.0100.06314.56
5.3.130.0030.04714.77
5.3.120.0070.06714.68
5.3.110.0130.07014.54
5.3.100.0030.04014.00
5.3.90.0030.06314.16
5.3.80.0030.03714.00
5.3.70.0030.06014.01
5.3.60.0100.06314.13
5.3.50.0130.03013.80
5.3.40.0030.03714.02
5.3.30.0070.04313.93
5.3.20.0070.08313.66
5.3.10.0170.05713.61
5.3.00.0100.04313.72
5.2.170.0130.05012.06
5.2.160.0070.03012.06
5.2.150.0030.03712.06
5.2.140.0030.04712.06
5.2.130.0000.03312.06
5.2.120.0070.03311.96
5.2.110.0030.03711.96
5.2.100.0030.03311.96
5.2.90.0000.06311.96
5.2.80.0000.06011.96
5.2.70.0030.05711.96
5.2.60.0100.02311.96
5.2.50.0030.03011.96
5.2.40.0000.03011.96
5.2.30.0030.04311.96
5.2.20.0100.02711.96
5.2.10.0030.03011.96
5.2.00.0000.04711.96
5.1.60.0030.02711.96
5.1.50.0100.04311.96
5.1.40.0030.04311.96
5.1.30.0030.03011.96
5.1.20.0000.03311.96
5.1.10.0100.04011.96
5.1.00.0070.05011.96
5.0.50.0030.04711.96
5.0.40.0030.03011.96
5.0.30.0070.06011.96
5.0.20.0000.02711.96
5.0.10.0000.04711.96
5.0.00.0030.04011.96
4.4.90.0000.01711.96
4.4.80.0000.01711.96
4.4.70.0070.02711.96
4.4.60.0000.02711.96
4.4.50.0000.02311.96
4.4.40.0070.05011.96
4.4.30.0070.01711.96
4.4.20.0000.03711.96
4.4.10.0070.03311.96
4.4.00.0000.05311.96
4.3.110.0000.03311.96
4.3.100.0000.02711.96
4.3.90.0030.02711.96
4.3.80.0000.05711.96
4.3.70.0100.01711.96
4.3.60.0030.03311.96
4.3.50.0030.03311.96
4.3.40.0000.04011.96
4.3.30.0000.03711.96
4.3.20.0000.02711.96
4.3.10.0030.03011.96
4.3.00.0030.01311.96