3v4l.org

run code in 300+ PHP versions simultaneously
<?php $intj = 5; $arrformfields[$intj][3] = 'ok'; $arrformfields[$intj][18] = 'ok'; ${$arrformfields[$intj][3]} = '1990'; ${$arrformfields[$intj][18]} = 4; $value = '1991;Y'; $arrvalidrules = explode(';', $value); // On vérifie qu'il n'y bien que deux valeurs. if (count($arrvalidrules) == 2) { $arrvarlabels = array('intyearstart', 'intyearend'); foreach ($arrvarlabels as $key => $label) // On va définir l'année de départ et de fin. { if ($arrvalidrules[$key]!='') // On a définit une valeur dans la règle. { if (is_numeric($arrvalidrules[$key])) // Valeur numérique fixe. { ${$label} = intval($arrvalidrules[$key]); } else if (strpos($arrvalidrules[$key], 'Y') === 0) // Valeur selon l'année actuelle. { ${$label} = date('Y'); if (($intsignpos = strpos($arrvalidrules[$key], '+')) !== false) // On vérifie si on souhaite faire une adition. { ${$label} += intval(trim(substr($arrvalidrules[$key], $intsignpos+1))); } else if (($intsignpos = strpos($arrvalidrules[$key], '-')) !== false) // On vérifie si on souhaite faire une soustraction. { ${$label} -= intval(trim(substr($arrvalidrules[$key], $intsignpos+1))); } } else // On a saisit une valeur erroné (du texte) on définit la valeur comme par défaut. { ${$label} = ($key == 0 ? str_pad(0, ${$arrformfields[$intj][18]}, '0') : null); } } else // Définition de la valeur par défaut (annéeDeb = 0, annéeFin = null). { ${$label} = ($key == 0 ? str_pad(0, ${$arrformfields[$intj][18]}, '0') : null); } } if ($intyearend !== null) { if ( (($intyearstart > $intyearend) && (${$arrformfields[$intj][3]} < $intyearend && ${$arrformfields[$intj][3]} > $intyearstart)) OR ${$arrformfields[$intj][3]} < $intyearstart && ${$arrformfields[$intj][3]} > $intyearend ) { if ($intyearstart > $intyearend) { // L'année de début > à la fin, on change les valeurs. $intswitch = $intyearstart; $intyearstart = $intyearend; $intyearend = $intswitch; } // "Le champ '".$arrformfields[$intj][1]."' est invalide, la valeur doit être comprise entre ".$intyearstart." et ".$intyearend." !<br />"; echo "Faux\n\n"; } } } 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).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0100.00718.43
8.3.50.0090.01122.03
8.3.40.0170.00318.92
8.3.30.0040.01118.75
8.3.20.0040.00418.90
8.3.10.0040.00420.66
8.3.00.0070.00723.66
8.2.180.0150.00316.88
8.2.170.0170.00322.96
8.2.160.0100.00320.38
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.48
8.2.110.0070.00422.14
8.2.100.0110.00017.93
8.2.90.0030.00619.34
8.2.80.0040.00418.04
8.2.70.0000.00817.62
8.2.60.0060.00318.16
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0050.00319.91
8.2.20.0080.00017.92
8.2.10.0040.00417.71
8.2.00.0000.00917.70
8.1.280.0220.00025.92
8.1.270.0000.00823.99
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0100.00022.71
8.1.230.0000.01121.04
8.1.220.0030.00618.77
8.1.210.0060.00318.78
8.1.200.0040.00417.48
8.1.190.0040.00417.65
8.1.180.0000.00818.10
8.1.170.0030.00518.71
8.1.160.0040.00418.89
8.1.150.0040.00418.76
8.1.140.0000.00817.52
8.1.130.0000.00717.88
8.1.120.0000.00817.59
8.1.110.0000.00717.60
8.1.100.0040.00417.51
8.1.90.0000.00717.54
8.1.80.0040.00417.55
8.1.70.0070.00017.58
8.1.60.0080.00017.68
8.1.50.0000.00817.50
8.1.40.0070.00017.64
8.1.30.0030.00617.74
8.1.20.0000.00817.75
8.1.10.0000.00817.57
8.1.00.0040.00417.61
8.0.300.0000.00720.02
8.0.290.0000.00816.88
8.0.280.0000.00818.45
8.0.270.0070.00017.32
8.0.260.0000.00617.03
8.0.250.0040.00417.12
8.0.240.0080.00017.18
8.0.230.0000.00717.11
8.0.220.0070.00017.08
8.0.210.0000.00817.02
8.0.200.0040.00417.09
8.0.190.0080.00017.09
8.0.180.0040.00417.00
8.0.170.0050.00316.87
8.0.160.0040.00417.02
8.0.150.0000.00916.91
8.0.140.0040.00816.95
8.0.130.0000.00613.41
8.0.120.0000.00717.01
8.0.110.0040.00417.04
8.0.100.0040.00416.82
8.0.90.0050.00316.99
8.0.80.0100.00616.98
8.0.70.0040.00417.05
8.0.60.0070.00017.06
8.0.50.0040.00416.89
8.0.30.0090.01117.17
8.0.20.0100.01017.40
8.0.10.0050.00217.00
8.0.00.0100.00817.03
7.4.330.0000.00514.76
7.4.320.0030.00316.50
7.4.300.0000.00716.60
7.4.290.0040.00416.69
7.4.280.0000.01016.62
7.4.270.0000.00716.54
7.4.260.0080.00013.25
7.4.250.0000.00716.65
7.4.240.0000.00816.72
7.4.230.0040.00416.44
7.4.220.0100.00716.69
7.4.210.0060.00916.59
7.4.200.0040.00416.51
7.4.190.0000.00716.54
7.4.160.0110.00616.46
7.4.150.0090.00917.40
7.4.140.0060.01017.86
7.4.130.0140.00516.74
7.4.120.0080.01116.74
7.4.110.0060.01216.93
7.4.100.0080.01516.66
7.4.90.0090.00916.75
7.4.80.0040.01519.04
7.4.70.0100.00716.52
7.4.60.0030.01916.41
7.4.50.0000.00916.59
7.4.40.0060.00622.27
7.4.30.0100.00616.69
7.4.00.0130.00314.87
7.3.330.0000.00613.41
7.3.320.0000.00613.14
7.3.310.0070.00016.49
7.3.300.0000.00716.40
7.3.290.0070.01316.39
7.3.280.0080.00916.44
7.3.270.0070.01017.40
7.3.260.0120.00718.24
7.3.250.0090.01016.55
7.3.240.0040.01216.60
7.3.230.0130.00616.59
7.3.210.0080.00816.56
7.3.200.0100.01019.39
7.3.190.0100.00716.54
7.3.180.0040.01116.79
7.3.170.0070.01116.46
7.3.160.0100.00616.38
7.3.120.0090.00914.81
7.3.10.0090.00816.63
7.3.00.0070.00716.63
7.2.330.0080.00816.58
7.2.320.0140.00316.66
7.2.310.0090.01216.89
7.2.300.0080.00816.64
7.2.290.0110.00716.68
7.2.130.0030.01216.97
7.2.120.0030.01116.77
7.2.110.0090.00616.91
7.2.100.0160.00016.66
7.2.90.0060.00916.70
7.2.80.0000.01016.77
7.2.70.0120.00816.85
7.2.60.0000.01616.84
7.2.50.0030.01416.81
7.2.40.0090.00616.95
7.2.30.0030.00816.66
7.2.20.0100.00316.91
7.2.10.0060.00616.78
7.2.00.0030.01017.12
7.1.250.0030.01315.71
7.1.70.0030.00717.41
7.1.60.0070.00317.15
7.1.50.0060.01917.20
7.1.00.0070.06022.33
7.0.200.0060.01016.74
7.0.140.0070.07022.04
7.0.100.0030.06019.97
7.0.90.0070.04319.93
7.0.80.0100.08019.93
7.0.70.0200.07020.03
7.0.60.0170.04019.91
7.0.50.0130.08320.39
7.0.40.0100.08020.03
7.0.30.0100.08019.92
7.0.20.0130.08020.00
7.0.10.0070.06020.12
7.0.00.0070.04320.12
5.6.280.0030.07321.07
5.6.250.0130.08320.60
5.6.240.0070.08020.61
5.6.230.0070.07020.64
5.6.220.0130.07020.71
5.6.210.0130.07320.56
5.6.200.0030.06320.95
5.6.190.0170.05321.05
5.6.180.0070.08721.12
5.6.170.0030.05721.04
5.6.160.0170.06020.96
5.6.150.0000.07321.07
5.6.140.0070.08321.18
5.6.130.0070.05021.15
5.6.120.0030.05721.02
5.6.110.0000.06021.06
5.6.100.0030.04321.01
5.6.90.0030.07720.95
5.6.80.0100.07720.42
5.6.70.0130.07020.38
5.6.60.0130.07320.55
5.6.50.0100.07320.36
5.6.40.0100.06320.47
5.6.30.0170.06720.33
5.6.20.0030.06720.32
5.6.10.0070.05720.46
5.6.00.0100.07320.41
5.5.380.0100.07720.47
5.5.370.0070.08320.36
5.5.360.0170.04720.42
5.5.350.0100.08320.40
5.5.340.0170.07020.91
5.5.330.0230.06720.79
5.5.320.0170.07320.65
5.5.310.0070.08320.88
5.5.300.0100.08020.89
5.5.290.0100.07720.78
5.5.280.0030.09720.90
5.5.270.0100.07720.78
5.5.260.0100.07320.88
5.5.250.0000.05320.55
5.5.240.0070.07020.26
5.5.230.0030.08320.29
5.5.220.0100.08320.26
5.5.210.0030.08320.16
5.5.200.0100.08320.26
5.5.190.0070.07020.28
5.5.180.0030.08320.14
5.5.160.0000.06720.25
5.5.150.0170.06720.00
5.5.140.0100.06320.00
5.5.130.0070.08020.12
5.5.120.0070.08320.27
5.5.110.0100.07320.09
5.5.100.0030.06319.96
5.5.90.0100.07320.18
5.5.80.0070.08020.11
5.5.70.0170.07320.11
5.5.60.0130.05320.11
5.5.50.0130.04020.16
5.5.40.0130.06719.96
5.5.30.0130.06320.10
5.5.20.0170.07320.15
5.5.10.0130.07320.06
5.5.00.0100.06320.01
5.4.450.0070.08019.30
5.4.440.0000.09019.14
5.4.430.0100.07319.45
5.4.420.0100.06719.46
5.4.410.0100.06719.17
5.4.400.0070.07719.06
5.4.390.0070.05018.96
5.4.380.0030.07019.03
5.4.370.0100.05318.81
5.4.360.0200.06718.81
5.4.350.0070.07718.90
5.4.340.0170.06719.09
5.4.320.0000.08318.79
5.4.310.0070.04319.13
5.4.300.0100.07019.04
5.4.290.0000.05019.23
5.4.280.0100.07319.06
5.4.270.0100.06318.78
5.4.260.0070.07719.14
5.4.250.0100.07719.11
5.4.240.0030.07719.07
5.4.230.0030.07719.07
5.4.220.0100.07719.19
5.4.210.0030.05019.22
5.4.200.0130.07019.05
5.4.190.0030.05719.01
5.4.180.0070.06319.06
5.4.170.0100.07719.09
5.4.160.0070.07319.21
5.4.150.0100.07318.96
5.4.140.0070.07716.42
5.4.130.0070.07016.27
5.4.120.0030.06316.43
5.4.110.0170.06716.44
5.4.100.0100.07016.36
5.4.90.0170.05716.27
5.4.80.0130.03716.34
5.4.70.0100.07316.38
5.4.60.0030.07016.23
5.4.50.0100.07316.42
5.4.40.0100.06316.24
5.4.30.0070.07016.32
5.4.20.0000.04016.20
5.4.10.0130.07016.41
5.4.00.0030.06315.46
5.3.290.0100.07014.63
5.3.280.0000.04314.61
5.3.270.0100.04714.63
5.3.260.0070.08014.56
5.3.250.0000.06014.46
5.3.240.0070.08314.48
5.3.230.0070.07714.57
5.3.220.0000.08314.57
5.3.210.0030.06314.53
5.3.200.0130.05314.41
5.3.190.0070.07714.54
5.3.180.0070.07714.54
5.3.170.0030.08314.58
5.3.160.0030.07014.55
5.3.150.0170.07014.42
5.3.140.0170.06714.54
5.3.130.0070.05714.39
5.3.120.0130.07014.48
5.3.110.0070.05314.52
5.3.100.0100.07014.06
5.3.90.0030.07713.98
5.3.80.0030.08013.99
5.3.70.0000.05013.90
5.3.60.0070.07013.88
5.3.50.0100.07313.93
5.3.40.0100.06013.95
5.3.30.0000.03313.79
5.3.20.0070.07313.70
5.3.10.0070.05313.61
5.3.00.0100.06713.64
5.2.170.0070.06710.96
5.2.160.0070.06011.02
5.2.150.0030.06711.21
5.2.140.0070.02311.19
5.2.130.0070.05310.95
5.2.120.0070.02711.15
5.2.110.0030.03011.18
5.2.100.0070.02311.04
5.2.90.0070.05711.11
5.2.80.0070.04310.95
5.2.70.0030.06711.11
5.2.60.0100.04311.03
5.2.50.0030.06311.03
5.2.40.0100.05310.84
5.2.30.0130.04011.03
5.2.20.0100.05710.81
5.2.10.0070.06010.97
5.2.00.0070.04710.67
5.1.60.0030.04710.48
5.1.50.0100.04710.48
5.1.40.0000.03710.48
5.1.30.0000.05310.48
5.1.20.0130.05010.48
5.1.10.0030.05710.48
5.1.00.0030.05010.48
5.0.50.0030.04310.48
5.0.40.0070.05010.48
5.0.30.0030.05010.48
5.0.20.0030.04010.48
5.0.10.0000.04710.48
5.0.00.0000.07010.48
4.4.90.0030.03310.48
4.4.80.0030.03710.48
4.4.70.0030.03710.48
4.4.60.0030.01710.48
4.4.50.0030.01710.48
4.4.40.0070.02710.48
4.4.30.0030.03310.48
4.4.20.0030.03710.48
4.4.10.0100.02710.48
4.4.00.0070.05010.48
4.3.110.0000.04010.48
4.3.100.0070.03310.48
4.3.90.0030.02710.48
4.3.80.0000.05710.48
4.3.70.0000.03310.48
4.3.60.0000.02310.48
4.3.50.0030.03310.48
4.3.40.0070.05010.48
4.3.30.0070.02710.48
4.3.20.0000.03710.48
4.3.10.0000.03710.48
4.3.00.0000.03010.48

preferences:
35.12 ms | 401 KiB | 5 Q