3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $usernameCheck = 'dani'; function checkUsername($username) { return (bool)!preg_match('/[^a-z_\-0-9]/i', $username); } var_dump(checkUsername($usernameCheck));

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.0030.00919.67
7.1.100.0060.00318.30
7.1.70.0040.00417.42
7.1.60.0070.01719.70
7.1.50.0030.02117.07
7.1.00.0070.07322.34
7.0.200.0360.00414.98
7.0.140.0070.07021.95
7.0.110.0130.08019.86
7.0.100.0130.05319.90
7.0.90.0170.08019.98
7.0.80.0300.07019.93
7.0.70.0230.07319.93
7.0.60.0100.07719.88
7.0.50.0100.08320.21
7.0.40.0130.07020.14
7.0.30.0100.07320.00
7.0.20.0100.07719.99
7.0.10.0100.07720.10
7.0.00.0200.07020.00
5.6.280.0070.07021.13
5.6.250.0130.07720.55
5.6.240.0030.09020.59
5.6.230.0100.08020.66
5.6.220.0070.09020.66
5.6.210.0070.08020.55
5.6.200.0100.06721.06
5.6.190.0200.05021.24
5.6.180.0170.07320.94
5.6.170.0130.07321.01
5.6.160.0030.05021.09
5.6.150.0100.08321.10
5.6.140.0170.07721.07
5.6.130.0330.06721.23
5.6.120.0130.06720.97
5.6.110.0100.07721.23
5.6.100.0200.06720.93
5.6.90.0070.08320.88
5.6.80.0000.08320.43
5.6.70.0000.08320.38
5.6.60.0170.05020.44
5.6.50.0100.06320.28
5.6.40.0170.07020.24
5.6.30.0000.08320.45
5.6.20.0130.07720.45
5.6.10.0070.05020.57
5.6.00.0100.07720.55
5.5.380.0030.08720.52
5.5.370.0070.09020.27
5.5.360.0170.07020.51
5.5.350.0030.09020.34
5.5.340.0130.07320.96
5.5.330.0200.06020.79
5.5.320.0000.08720.94
5.5.310.0070.08020.83
5.5.300.0100.06020.79
5.5.290.0130.07720.93
5.5.280.0130.07720.73
5.5.270.0100.08720.89
5.5.260.0100.07720.93
5.5.250.0070.08320.66
5.5.240.0030.08320.15
5.5.230.0070.06720.07
5.5.220.0070.08320.10
5.5.210.0100.08020.28
5.5.200.0030.08320.17
5.5.190.0030.07720.20
5.5.180.0100.07720.29
5.5.160.0030.08020.27
5.5.150.0000.07720.33
5.5.140.0070.07720.24
5.5.130.0030.07720.24
5.5.120.0130.07020.04
5.5.110.0170.07020.16
5.5.100.0170.04020.01
5.5.90.0200.06720.20
5.5.80.0200.05319.97
5.5.70.0100.08020.09
5.5.60.0100.07320.14
5.5.50.0070.05720.21
5.5.40.0130.06720.11
5.5.30.0070.04320.04
5.5.20.0100.08020.05
5.5.10.0170.06720.12
5.5.00.0170.06320.17
5.4.450.0100.07719.48
5.4.440.0130.07019.31
5.4.430.0100.07319.41
5.4.420.0130.05719.64
5.4.410.0100.04319.18
5.4.400.0030.04718.99
5.4.390.0000.08319.00
5.4.380.0130.06718.98
5.4.370.0100.07319.15
5.4.360.0070.08019.14
5.4.350.0070.07019.03
5.4.340.0000.05319.00
5.4.320.0130.07319.17
5.4.310.0170.06319.31
5.4.300.0070.07018.95
5.4.290.0070.07719.15
5.4.280.0100.07319.27
5.4.270.0070.08018.99
5.4.260.0100.04719.15
5.4.250.0100.04319.05
5.4.240.0130.07319.08
5.4.230.0070.06719.02
5.4.220.0130.06719.14
5.4.210.0070.07018.99
5.4.200.0100.08019.28
5.4.190.0130.06719.02
5.4.180.0000.04019.08
5.4.170.0100.07319.10
5.4.160.0000.08019.18
5.4.150.0000.05019.01
5.4.140.0100.07316.53
5.4.130.0030.07016.34
5.4.120.0100.07316.54
5.4.110.0030.04716.59
5.4.100.0130.06316.55
5.4.90.0100.07016.48
5.4.80.0100.04016.57
5.4.70.0130.06316.29
5.4.60.0130.06716.41
5.4.50.0030.07716.52
5.4.40.0070.04316.49
5.4.30.0000.07316.54
5.4.20.0030.04716.56
5.4.10.0130.04016.38
5.4.00.0030.07715.88
5.3.290.0170.07014.74
5.3.280.0070.07714.73
5.3.270.0070.07314.59
5.3.260.0070.03314.61
5.3.250.0130.06714.61
5.3.240.0070.07314.55
5.3.230.0030.04714.82
5.3.220.0030.08014.79
5.3.210.0100.07314.58
5.3.200.0100.06014.54
5.3.190.0030.07314.69
5.3.180.0070.07714.64
5.3.170.0030.07314.41
5.3.160.0130.05014.57
5.3.150.0030.05314.41
5.3.140.0070.05314.69
5.3.130.0070.07014.63
5.3.120.0170.06714.55
5.3.110.0000.08014.62
5.3.100.0130.06714.17
5.3.90.0070.07314.00
5.3.80.0030.04314.14
5.3.70.0000.03714.03
5.3.60.0130.06713.95
5.3.50.0030.06313.95
5.3.40.0070.06013.90
5.3.30.0070.06313.86
5.3.20.0030.08313.78
5.3.10.0070.06313.61
5.3.00.0100.06713.64
5.2.170.0000.03011.16
5.2.160.0000.06711.11
5.2.150.0070.06011.36
5.2.140.0070.05011.21
5.2.130.0100.05311.11
5.2.120.0070.06011.05
5.2.110.0030.06011.32
5.2.100.0000.06711.18
5.2.90.0000.05311.09
5.2.80.0070.05711.05
5.2.70.0030.04711.09
5.2.60.0000.06711.12
5.2.50.0100.06011.16
5.2.40.0000.03711.02
5.2.30.0100.06010.98
5.2.20.0000.06311.09
5.2.10.0070.05711.00
5.2.00.0070.06310.85
5.1.60.0100.04710.14
5.1.50.0000.05710.16
5.1.40.0000.0609.80
5.1.30.0030.05710.46
5.1.20.0030.06010.30
5.1.10.0100.04710.14
5.1.00.0030.0609.89
5.0.50.0070.0308.97
5.0.40.0030.0408.97
5.0.30.0000.0338.97
5.0.20.0030.0438.97
5.0.10.0030.0408.97
5.0.00.0070.0608.97
4.4.90.0000.0408.97
4.4.80.0000.0378.97
4.4.70.0000.0378.97
4.4.60.0030.0308.97
4.4.50.0030.0208.97
4.4.40.0070.0508.97
4.4.30.0130.0278.97
4.4.20.0000.0308.97
4.4.10.0070.0308.97
4.4.00.0030.0538.97
4.3.110.0030.0308.97
4.3.100.0000.0278.97
4.3.90.0000.0238.97
4.3.80.0000.0578.97
4.3.70.0030.0338.97
4.3.60.0100.0278.97
4.3.50.0100.0278.97
4.3.40.0130.0408.97
4.3.30.0070.0308.97
4.3.20.0000.0308.97
4.3.10.0000.0378.97
4.3.00.0030.0378.97