3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $globalVar = 'Hey I\'m global'; function getAllArgs(&$globalVar1) { /* if(func_num_args() > 0) { foreach(func_get_args() as $arg => $value) { echo $arg. ' ' . $value; } }else { echo 'No arguments given';__construct } */ $globalVar1 = 'Now I\'ve been modified by the function.'; } echo "Here is the argument BEFORE we modify it:" . $globalVar; getAllArgs($globalVar); echo "Here it is AFTER:" . $globalVar;

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.0000.01316.86
7.2.00.0040.00819.04
7.1.200.0040.00415.63
7.1.100.0030.01018.00
7.1.70.0050.00317.14
7.1.60.0140.01019.32
7.1.50.0100.01316.81
7.1.00.0000.07722.27
7.0.200.0070.00316.46
7.0.140.0070.07322.12
7.0.100.0070.07320.03
7.0.90.0070.07719.84
7.0.80.0030.07019.94
7.0.70.0270.06319.95
7.0.60.0000.08020.02
7.0.50.0100.03720.35
7.0.40.0070.04320.02
7.0.30.0130.04720.05
7.0.20.0130.07320.09
7.0.10.0100.07720.14
7.0.00.0200.05320.02
5.6.280.0030.07321.04
5.6.250.0170.07020.68
5.6.240.0030.05720.62
5.6.230.0130.08020.48
5.6.220.0100.08320.44
5.6.210.0100.04320.61
5.6.200.0070.08721.11
5.6.190.0130.08021.04
5.6.180.0130.07721.01
5.6.170.0070.08021.00
5.6.160.0130.06021.06
5.6.150.0070.06321.02
5.6.140.0000.04020.96
5.6.130.0030.05021.06
5.6.120.0000.09020.99
5.6.110.0070.08721.16
5.6.100.0130.07321.04
5.6.90.0070.04721.16
5.6.80.0170.03720.46
5.6.70.0030.07320.39
5.6.60.0200.06720.32
5.6.50.0170.05320.44
5.6.40.0070.08720.39
5.6.30.0100.03720.41
5.6.20.0130.02720.29
5.6.10.0100.03320.52
5.6.00.0070.03720.48
5.5.380.0100.06720.34
5.5.370.0100.04720.32
5.5.360.0070.07720.34
5.5.350.0130.08720.42
5.5.340.0030.05020.86
5.5.330.0200.07320.77
5.5.320.0130.07020.90
5.5.310.0070.04720.93
5.5.300.0100.08020.77
5.5.290.0030.08020.91
5.5.280.0030.06020.91
5.5.270.0100.07320.82
5.5.260.0130.08020.77
5.5.250.0100.08020.73
5.5.240.0030.08320.18
5.5.230.0100.05020.21
5.5.220.0000.07720.20
5.5.210.0130.04020.14
5.5.200.0100.07320.23
5.5.190.0070.04720.13
5.5.180.0030.04019.96
5.5.160.0030.03720.26
5.5.150.0030.04020.23
5.5.140.0030.04020.24
5.5.130.0030.03720.06
5.5.120.0170.02320.14
5.5.110.0100.04320.10
5.5.100.0070.03720.18
5.5.90.0070.03720.10
5.5.80.0000.04320.07
5.5.70.0030.04020.16
5.5.60.0070.04020.03
5.5.50.0130.03020.06
5.5.40.0030.03720.15
5.5.30.0100.02720.05
5.5.20.0000.05319.99
5.5.10.0030.03320.13
5.5.00.0030.05020.03
5.4.450.0070.08019.37
5.4.440.0130.06019.38
5.4.430.0100.04719.35
5.4.420.0030.07719.46
5.4.410.0100.05719.07
5.4.400.0070.07319.16
5.4.390.0230.05719.03
5.4.380.0100.04019.10
5.4.370.0030.05719.16
5.4.360.0000.08319.04
5.4.350.0070.04019.03
5.4.340.0030.03719.21
5.4.320.0100.03319.14
5.4.310.0070.03319.14
5.4.300.0000.04019.09
5.4.290.0030.03318.94
5.4.280.0100.03319.05
5.4.270.0070.04019.23
5.4.260.0000.04019.20
5.4.250.0100.02719.24
5.4.240.0000.04718.94
5.4.230.0030.03018.89
5.4.220.0030.04319.17
5.4.210.0100.03018.91
5.4.200.0000.03719.11
5.4.190.0070.04018.89
5.4.180.0030.05318.89
5.4.170.0030.03718.93
5.4.160.0000.04019.03
5.4.150.0070.03318.88
5.4.140.0000.04016.36
5.4.130.0000.04016.34
5.4.120.0070.03016.44
5.4.110.0030.03316.51
5.4.100.0000.04016.32
5.4.90.0030.03316.55
5.4.80.0070.03016.47
5.4.70.0070.04316.47
5.4.60.0030.03316.31
5.4.50.0000.03716.36
5.4.40.0000.03316.54
5.4.30.0030.03716.47
5.4.20.0070.03316.47
5.4.10.0030.03716.36
5.4.00.0000.03315.79
5.3.290.0000.04014.77
5.3.280.0000.03714.58
5.3.270.0100.03314.72
5.3.260.0100.03014.71
5.3.250.0000.04014.57
5.3.240.0070.03714.52
5.3.230.0030.03714.54
5.3.220.0030.03714.67
5.3.210.0070.03314.66
5.3.200.0030.03714.68
5.3.190.0000.03714.50
5.3.180.0000.04014.70
5.3.170.0070.03714.54
5.3.160.0030.03314.48
5.3.150.0030.03014.57
5.3.140.0030.03314.47
5.3.130.0170.02314.56
5.3.120.0030.03014.68
5.3.110.0070.03314.49
5.3.100.0070.03014.01
5.3.90.0000.03314.13
5.3.80.0200.02313.92
5.3.70.0030.03714.11
5.3.60.0030.03714.00
5.3.50.0070.03314.08
5.3.40.0000.04013.92
5.3.30.0130.04713.96
5.3.20.0100.02713.61
5.3.10.0000.08013.75
5.3.00.0030.05313.56
5.2.170.0000.03011.24
5.2.160.0030.02311.17
5.2.150.0030.02311.07
5.2.140.0000.03311.13
5.2.130.0000.02710.96
5.2.120.0000.04011.13
5.2.110.0000.06311.12
5.2.100.0070.03011.03
5.2.90.0000.06010.98
5.2.80.0000.03011.20
5.2.70.0070.03010.95
5.2.60.0030.03710.93
5.2.50.0000.04310.88
5.2.40.0070.03011.00
5.2.30.0070.03710.99
5.2.20.0100.05310.95
5.2.10.0070.02710.72
5.2.00.0030.03710.71
5.1.60.0070.05310.07
5.1.50.0100.02710.02
5.1.40.0030.0309.85
5.1.30.0030.05710.23
5.1.20.0070.05310.37
5.1.10.0000.04310.15
5.1.00.0100.05010.11
5.0.50.0030.0239.50
5.0.40.0000.0409.50
5.0.30.0070.0579.50
5.0.20.0000.0479.50
5.0.10.0030.0239.50
5.0.00.0070.0579.50
4.4.90.0000.0379.50
4.4.80.0000.0179.50
4.4.70.0000.0309.50
4.4.60.0030.0179.50
4.4.50.0030.0379.50
4.4.40.0000.0539.50
4.4.30.0000.0309.50
4.4.20.0030.0379.50
4.4.10.0100.0279.50
4.4.00.0100.0509.50
4.3.110.0030.0309.50
4.3.100.0070.0339.50
4.3.90.0000.0339.50
4.3.80.0030.0509.50
4.3.70.0000.0279.50
4.3.60.0000.0179.50
4.3.50.0030.0339.50
4.3.40.0030.0339.50
4.3.30.0030.0179.50
4.3.20.0000.0379.50
4.3.10.0000.0379.50
4.3.00.0030.0279.50