3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function staticSurprise() { static $v = 'Before'; echo $v; sleep(1); return; static $v = 'After'; } staticSurprise();

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.00.0080.00418.82
7.1.100.0070.01118.02
7.1.70.0040.00416.84
7.1.60.0030.01319.43
7.1.50.0090.01216.95
7.1.00.0030.03322.30
7.0.200.0230.01014.50
7.0.140.0070.07022.00
7.0.60.0000.04319.88
7.0.50.0070.07317.86
7.0.40.0130.05320.04
7.0.30.0200.04020.23
7.0.20.0270.08320.23
7.0.10.0430.05020.09
7.0.00.0200.07320.29
5.6.280.0070.07321.07
5.6.210.0130.03320.55
5.6.200.0000.05718.18
5.6.190.0130.08720.61
5.6.180.0170.04020.57
5.6.170.0330.04720.64
5.6.160.0130.03320.44
5.6.150.0070.07018.19
5.6.140.0030.04318.24
5.6.130.0030.09018.23
5.6.120.0100.08720.89
5.6.110.0100.08021.12
5.6.100.0070.07320.98
5.6.90.0130.08020.95
5.6.80.0130.08020.39
5.6.70.0300.04720.51
5.5.350.0100.08020.47
5.5.340.0030.05317.97
5.5.330.0100.08320.55
5.5.320.0270.06020.28
5.5.310.0270.07020.32
5.5.300.0030.08317.94
5.5.290.0030.08318.07
5.5.280.0070.04320.75
5.5.270.0100.05020.86
5.5.260.0230.04020.73
5.5.250.0070.08320.78
5.5.240.0130.07320.16
5.4.450.0800.05019.47
5.4.440.0270.05319.58
5.4.430.0200.06019.47
5.4.420.0230.05319.48
5.4.410.0300.06719.32
5.4.400.1100.04718.62
5.4.390.1200.05718.70
5.4.380.0330.06318.70
5.4.370.0230.05018.83
5.4.360.0130.05318.66
5.4.350.0240.04312.02
5.4.340.0160.03612.02
5.4.320.0040.04112.50
5.4.310.0090.03912.50
5.4.300.0080.04912.50
5.4.290.0050.03912.50
5.4.280.0040.03812.39
5.4.270.0060.04412.40
5.4.260.0060.03812.40
5.4.250.0060.03812.40
5.4.240.0030.07018.94
5.4.230.0070.05318.92
5.4.220.0070.05018.98
5.4.210.0030.05318.79
5.4.200.0070.05018.89
5.4.190.0030.05318.83
5.4.180.0000.05718.95
5.4.170.0000.06019.00
5.4.160.0070.05018.75
5.4.150.0070.05318.88
5.4.140.0030.05016.38
5.4.130.0100.04716.38
5.4.120.0100.06016.58
5.4.110.0070.04716.56
5.4.100.0000.05316.67
5.4.90.0070.04716.55
5.4.80.0100.04316.63
5.4.70.0030.05016.69
5.4.60.0030.05016.38
5.4.50.0130.05016.30
5.4.40.0000.05316.44
5.4.30.0170.03716.61
5.4.20.0100.05316.53
5.4.10.0100.04316.49
5.4.00.0070.05015.83
5.3.290.0060.03912.80
5.3.280.0030.06714.50
5.3.270.0130.04314.68
5.3.260.0070.05714.80
5.3.250.0070.05014.68
5.3.240.0100.05014.68
5.3.230.0030.05014.78
5.3.220.0130.04014.73
5.3.210.0100.04714.53
5.3.200.0000.05314.64
5.3.190.0070.05014.39
5.3.180.0030.05014.39
5.3.170.0100.04314.78
5.3.160.0030.06714.65
5.3.150.0030.05014.64
5.3.140.0070.05714.59
5.3.130.0070.05014.72
5.3.120.0030.05714.70
5.3.110.0070.05014.53
5.3.100.0100.04314.09
5.3.90.0030.07014.11
5.3.80.0000.05714.10
5.3.70.0130.04014.09
5.3.60.0030.07014.00
5.3.50.0100.05714.10
5.3.40.0000.05714.02
5.3.30.0030.05013.73
5.3.20.0070.04313.52
5.3.10.0070.04713.87
5.3.00.0070.04713.63
5.2.170.0030.04011.09
5.2.160.0100.03311.04
5.2.150.0000.04311.12
5.2.140.0030.04311.14
5.2.130.0030.04011.16
5.2.120.0070.03711.18
5.2.110.0030.04011.09
5.2.100.0100.04711.18
5.2.90.0000.04311.18
5.2.80.0100.03711.16
5.2.70.0070.03711.17
5.2.60.0070.05711.03
5.2.50.0000.06011.05
5.2.40.0070.03710.96
5.2.30.0100.03711.04
5.2.20.0070.04011.02
5.2.10.0030.04010.94
5.2.00.0100.03310.70
5.1.60.0070.0309.83
5.1.50.0030.03310.19
5.1.40.0030.03310.01
5.1.30.0030.03710.54
5.1.20.0030.05010.25
5.1.10.0100.03310.31
5.1.00.0100.02710.02
5.0.50.0000.0308.50
5.0.40.0030.0278.48
5.0.30.0030.0438.27
5.0.20.0070.0238.26
5.0.10.0030.0278.26
5.0.00.0000.0438.23
4.4.90.0000.0205.77
4.4.80.0030.0205.84
4.4.70.0070.0175.84
4.4.60.0070.0175.86
4.4.50.0000.0235.85
4.4.40.0070.0275.84
4.4.30.0070.0175.75
4.4.20.0000.0235.89
4.4.10.0000.0235.91
4.4.00.0000.0475.94
4.3.110.0030.0235.79
4.3.100.0000.0235.90
4.3.90.0030.0205.74
4.3.80.0000.0375.75
4.3.70.0000.0205.76
4.3.60.0000.0235.72
4.3.50.0000.0235.75
4.3.40.0030.0305.73
4.3.30.0030.0204.48
4.3.20.0000.0234.47
4.3.10.0030.0204.47
4.3.00.0000.0236.71