3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $value = ';'; $arrvalidrules = explode(';', $value); // On vérifie qu'il n'y bien que deux valeurs. if (count($arrvalidrules) == 2) { $intyearend = null; if ($arrvalidrules[0]!='') { if (is_numeric($arrvalidrules[0])) { $intyearstart=intval($arrvalidrules[0]); } else if (strpos($arrvalidrules[0], 'Y') === 0) { $intyearstart = date('Y'); if (($intsignpos = strpos($arrvalidrules[0], '+')) !== false) { $intyearstart += intval(substr($arrvalidrules[0], $intsignpos)); } else if (($intsignpos = strpos($arrvalidrules[0], '-')) !== false) { $intyearstart -= intval(substr($arrvalidrules[0], $intsignpos)); } } else { $intyearstart = false; } } else { $intyearstart = 0; } } echo 'Date : '.$intyearstart.' - '.$intyearend;

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.0040.00716.84
7.2.00.0060.00619.43
7.1.200.0120.00315.84
7.1.100.0000.00718.25
7.1.70.0040.00417.19
7.1.60.0070.01819.82
7.1.50.0120.00616.93
7.1.00.0030.07322.29
7.0.200.0030.00616.50
7.0.140.0100.06722.21
7.0.90.0130.07719.91
7.0.80.0170.04019.93
7.0.70.0100.08319.91
7.0.60.0470.05019.81
7.0.50.0170.07020.36
7.0.40.0070.07720.04
7.0.30.0100.08020.08
7.0.20.0030.09320.14
7.0.10.0100.06319.99
7.0.00.0100.07320.04
5.6.280.0030.09021.08
5.6.240.0070.05320.68
5.6.230.0070.08720.64
5.6.220.0030.08320.49
5.6.210.0100.07720.64
5.6.200.0000.09021.11
5.6.190.0070.07021.04
5.6.180.0070.04020.97
5.6.170.0030.07721.03
5.6.160.0100.08321.04
5.6.150.0030.04721.05
5.6.140.0070.04721.01
5.6.130.0030.05720.95
5.6.120.0070.07721.04
5.6.110.0200.07321.10
5.6.100.0100.06721.00
5.6.90.0070.08021.11
5.6.80.0030.08320.39
5.6.70.0100.08020.34
5.6.60.0070.07720.51
5.6.50.0070.06720.52
5.6.40.0070.07720.40
5.6.30.0000.04720.46
5.6.20.0030.08320.29
5.6.10.0170.07320.37
5.6.00.0130.07720.36
5.5.380.0070.04320.45
5.5.370.0100.07320.43
5.5.360.0030.07720.34
5.5.350.0070.04720.42
5.5.340.0100.08020.78
5.5.330.0130.07020.89
5.5.320.0100.06720.87
5.5.310.0130.08020.76
5.5.300.0030.09020.91
5.5.290.0030.08320.91
5.5.280.0070.08320.73
5.5.270.0030.06020.86
5.5.260.0070.05320.84
5.5.250.0070.07720.60
5.5.240.0070.08320.12
5.5.230.0070.04020.02
5.5.220.0100.07720.17
5.5.210.0130.05720.21
5.5.200.0100.06720.26
5.5.190.0100.08020.25
5.5.180.0070.07720.08
5.5.160.0000.06020.18
5.5.150.0100.07720.08
5.5.140.0070.07320.23
5.5.130.0070.07320.14
5.5.120.0030.05720.27
5.5.110.0030.04720.26
5.5.100.0030.07320.03
5.5.90.0100.07719.95
5.5.80.0100.07719.98
5.5.70.0030.07720.10
5.5.60.0030.08020.06
5.5.50.0070.05020.11
5.5.40.0100.06020.15
5.5.30.0130.07320.03
5.5.20.0200.06020.13
5.5.10.0100.07020.05
5.5.00.0130.07019.96
5.4.450.0070.06319.29
5.4.440.0170.07319.11
5.4.430.0100.04719.55
5.4.420.0100.07719.29
5.4.410.0070.07719.14
5.4.400.0130.05318.98
5.4.390.0030.04719.06
5.4.380.0100.06019.23
5.4.370.0100.03318.78
5.4.360.0070.08319.13
5.4.350.0070.07319.14
5.4.340.0070.04319.13
5.4.320.0000.04719.09
5.4.310.0100.07018.84
5.4.300.0070.07719.04
5.4.290.0100.07319.02
5.4.280.0070.07318.78
5.4.270.0070.07318.81
5.4.260.0130.07019.03
5.4.250.0100.07318.98
5.4.240.0100.07318.89
5.4.230.0130.05718.84
5.4.220.0100.06019.05
5.4.210.0070.07319.07
5.4.200.0100.08019.14
5.4.190.0070.04719.11
5.4.180.0130.06319.08
5.4.170.0130.06018.93
5.4.160.0100.04319.18
5.4.150.0100.03718.88
5.4.140.0030.04316.13
5.4.130.0170.06716.27
5.4.120.0070.04316.27
5.4.110.0030.07716.34
5.4.100.0030.07716.22
5.4.90.0070.04316.30
5.4.80.0030.04316.40
5.4.70.0070.03316.20
5.4.60.0100.07016.20
5.4.50.0270.05716.20
5.4.40.0030.04016.33
5.4.30.0030.03716.33
5.4.20.0100.07316.31
5.4.10.0170.04016.20
5.4.00.0030.04315.56
5.3.290.0070.04314.51
5.3.280.0070.06014.54
5.3.270.0030.08314.58
5.3.260.0070.07014.62
5.3.250.0030.04714.58
5.3.240.0070.07014.48
5.3.230.0030.07314.57
5.3.220.0030.07714.59
5.3.210.0030.08014.44
5.3.200.0070.07314.39
5.3.190.0030.05714.43
5.3.180.0030.05714.43
5.3.170.0070.04014.48
5.3.160.0130.07014.40
5.3.150.0100.05314.41
5.3.140.0130.07314.52
5.3.130.0000.07014.51
5.3.120.0100.07714.50
5.3.110.0030.07714.49
5.3.100.0100.03313.91
5.3.90.0070.06713.98
5.3.80.0030.07313.96
5.3.70.0100.03714.01
5.3.60.0070.05714.02
5.3.50.0000.04313.95
5.3.40.0130.06013.91
5.3.30.0100.03713.89
5.3.20.0000.04313.71
5.3.10.0100.04313.66
5.3.00.0100.04713.56
5.2.170.0030.06311.11
5.2.160.0100.05711.11
5.2.150.0000.03311.00
5.2.140.0000.04011.07
5.2.130.0000.03311.15
5.2.120.0000.06711.16
5.2.110.0100.04310.96
5.2.100.0070.04010.97
5.2.90.0030.04011.07
5.2.80.0070.05311.10
5.2.70.0000.03311.05
5.2.60.0000.04311.05
5.2.50.0000.05310.82
5.2.40.0030.05310.81
5.2.30.0000.05010.90
5.2.20.0100.02310.97
5.2.10.0030.03010.91
5.2.00.0070.05310.86
5.1.60.0070.05010.37
5.1.50.0070.02310.37
5.1.40.0030.05010.37
5.1.30.0030.04310.39
5.1.20.0030.06310.43
5.1.10.0000.03710.37
5.1.00.0030.04310.37
5.0.50.0000.04710.37
5.0.40.0000.02310.37
5.0.30.0070.05310.37
5.0.20.0030.04310.37
5.0.10.0030.04010.37
5.0.00.0070.05010.37
4.4.90.0000.02010.37
4.4.80.0000.02710.37
4.4.70.0000.01710.37
4.4.60.0070.02010.37
4.4.50.0030.03310.37
4.4.40.0000.02710.37
4.4.30.0000.03710.37
4.4.20.0000.03310.37
4.4.10.0070.03310.37
4.4.00.0070.05010.37
4.3.110.0000.02010.37
4.3.100.0000.03010.37
4.3.90.0030.01710.37
4.3.80.0000.02710.37
4.3.70.0030.03010.37
4.3.60.0070.03010.37
4.3.50.0070.03310.37
4.3.40.0030.04010.37
4.3.30.0030.03710.37
4.3.20.0000.03710.37
4.3.10.0030.03310.37
4.3.00.0030.03310.37