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 = '1900;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.0040.01118.43
8.3.50.0120.00722.05
8.3.40.0120.00318.79
8.3.30.0140.00419.21
8.3.20.0000.00820.34
8.3.10.0050.00323.52
8.3.00.0040.00420.77
8.2.180.0220.00017.00
8.2.170.0040.01122.96
8.2.160.0100.00322.10
8.2.150.0080.00024.18
8.2.140.0130.00624.66
8.2.130.0040.00426.16
8.2.120.0070.00021.03
8.2.110.0070.00320.93
8.2.100.0130.00318.03
8.2.90.0030.00519.35
8.2.80.0080.00017.97
8.2.70.0020.01017.63
8.2.60.0040.00418.05
8.2.50.0050.00318.10
8.2.40.0030.00818.22
8.2.30.0040.00418.14
8.2.20.0040.00417.66
8.2.10.0000.00817.89
8.2.00.0000.00817.84
8.1.280.0070.00725.92
8.1.270.0070.01023.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.00922.75
8.1.230.0080.00317.95
8.1.220.0040.00417.91
8.1.210.0000.00918.77
8.1.200.0030.00617.47
8.1.190.0050.00517.60
8.1.180.0000.00818.10
8.1.170.0030.00518.64
8.1.160.0020.00522.04
8.1.150.0030.00518.84
8.1.140.0040.00417.54
8.1.130.0000.00817.96
8.1.120.0000.00717.66
8.1.110.0000.00817.62
8.1.100.0070.00017.58
8.1.90.0030.00517.51
8.1.80.0070.00017.63
8.1.70.0000.00717.63
8.1.60.0000.00817.68
8.1.50.0030.00617.62
8.1.40.0000.00717.64
8.1.30.0000.00817.71
8.1.20.0000.00817.65
8.1.10.0040.00417.73
8.1.00.0030.00617.64
8.0.300.0030.00518.77
8.0.290.0040.00416.71
8.0.280.0040.00418.59
8.0.270.0070.00017.31
8.0.260.0030.00316.91
8.0.250.0030.00317.04
8.0.240.0000.00817.10
8.0.230.0000.00717.02
8.0.220.0000.00717.02
8.0.210.0000.00716.96
8.0.200.0030.00317.07
8.0.190.0000.00716.97
8.0.180.0030.00516.95
8.0.170.0030.00517.03
8.0.160.0050.00317.05
8.0.150.0000.00716.92
8.0.140.0040.00416.91
8.0.130.0000.00513.39
8.0.120.0040.00416.95
8.0.110.0040.00417.00
8.0.100.0040.00416.86
8.0.90.0040.00416.98
8.0.80.0070.01116.97
8.0.70.0080.00016.86
8.0.60.0040.00416.86
8.0.50.0070.00017.02
8.0.30.0120.00717.04
8.0.20.0120.00917.40
8.0.10.0080.00017.07
8.0.00.0090.01016.87
7.4.330.0050.00015.14
7.4.320.0000.00616.61
7.4.300.0060.00016.65
7.4.290.0070.00016.59
7.4.280.0000.00716.59
7.4.270.0060.00016.76
7.4.260.0070.00016.48
7.4.250.0070.00016.58
7.4.240.0020.00516.62
7.4.230.0030.00316.45
7.4.220.0090.00916.64
7.4.210.0090.00816.70
7.4.200.0040.00316.73
7.4.190.0030.00316.83
7.4.160.0100.00716.56
7.4.150.0070.01017.40
7.4.140.0110.00917.86
7.4.130.0070.00916.74
7.4.120.0080.01016.72
7.4.110.0090.00616.53
7.4.100.0140.00316.72
7.4.90.0100.00716.52
7.4.80.0140.00916.67
7.4.70.0060.00916.57
7.4.60.0100.00716.75
7.4.50.0040.00416.49
7.4.40.0070.01122.77
7.4.30.0050.01116.84
7.4.00.0070.01014.71
7.3.330.0060.00013.30
7.3.320.0000.00613.26
7.3.310.0050.00216.43
7.3.300.0030.00316.32
7.3.290.0090.00616.50
7.3.280.0030.01216.44
7.3.270.0070.01717.40
7.3.260.0100.01016.64
7.3.250.0060.01216.66
7.3.240.0040.01816.64
7.3.230.0130.00616.65
7.3.210.0050.01716.49
7.3.200.0100.00719.39
7.3.190.0210.03216.37
7.3.180.0090.00616.43
7.3.170.0090.00616.53
7.3.160.0130.00416.51
7.3.120.0100.00715.24
7.2.330.0070.01016.74
7.2.320.0090.01216.59
7.2.310.0130.00816.62
7.2.300.0120.00616.76
7.2.290.0060.01516.89
7.2.60.0040.00816.82
7.2.00.0070.01019.36
7.1.200.0000.00716.04
7.1.100.0070.00718.14
7.1.70.0120.00617.08
7.1.60.0130.01319.32
7.1.50.0110.00416.82
7.1.00.0030.07722.31
7.0.200.0070.00416.99
7.0.140.0000.07722.07
7.0.100.0100.08020.01
7.0.90.0100.07719.94
7.0.80.0130.07319.95
7.0.70.0130.06720.02
7.0.60.0130.05020.13
7.0.50.0130.06020.43
7.0.40.0170.07720.04
7.0.30.0070.05320.10
7.0.20.0000.08720.10
7.0.10.0100.07320.07
7.0.00.0030.05020.14
5.6.280.0070.07020.87
5.6.250.0070.08020.76
5.6.240.0030.05020.55
5.6.230.0130.08020.68
5.6.220.0070.08020.65
5.6.210.0030.07020.77
5.6.200.0130.04020.96
5.6.190.0030.08721.02
5.6.180.0030.06021.01
5.6.170.0070.05320.97
5.6.160.0070.07020.97
5.6.150.0100.08321.09
5.6.140.0070.06321.05
5.6.130.0070.08721.18
5.6.120.0030.08320.99
5.6.110.0070.05321.01
5.6.100.0100.07021.03
5.6.90.0070.06721.09
5.6.80.0130.07320.45
5.6.70.0070.05720.39
5.6.60.0130.06320.45
5.6.50.0070.05020.35
5.6.40.0130.04320.41
5.6.30.0030.08020.42
5.6.20.0030.08320.38
5.6.10.0070.06320.38
5.6.00.0030.05720.43
5.5.380.0000.07720.43
5.5.370.0100.07720.36
5.5.360.0100.08320.35
5.5.350.0130.08020.38
5.5.340.0100.07020.93
5.5.330.0130.04720.90
5.5.320.0130.07720.89
5.5.310.0130.07720.81
5.5.300.0070.07320.87
5.5.290.0100.05720.93
5.5.280.0270.06720.91
5.5.270.0070.07320.84
5.5.260.0200.07020.91
5.5.250.0070.04020.70
5.5.240.0170.03720.19
5.5.230.0070.05020.26
5.5.220.0070.08020.12
5.5.210.0070.06720.03
5.5.200.0170.06720.14
5.5.190.0070.04320.24
5.5.180.0070.06020.24
5.5.160.0070.07720.27
5.5.150.0100.04320.27
5.5.140.0100.04320.22
5.5.130.0100.07720.14
5.5.120.0000.05320.27
5.5.110.0000.05320.24
5.5.100.0100.07019.96
5.5.90.0030.06320.06
5.5.80.0030.08320.13
5.5.70.0070.04020.07
5.5.60.0070.08020.10
5.5.50.0100.04020.11
5.5.40.0000.04720.04
5.5.30.0070.07320.10
5.5.20.0100.07320.00
5.5.10.0030.05720.07
5.5.00.0070.09019.97
5.4.450.0100.08019.30
5.4.440.0070.06319.32
5.4.430.0000.07019.35
5.4.420.0070.04319.07
5.4.410.0070.04319.32
5.4.400.0030.04318.98
5.4.390.0100.08019.12
5.4.380.0000.08019.06
5.4.370.0000.08718.81
5.4.360.0100.07718.96
5.4.350.0000.06018.96
5.4.340.0070.07319.03
5.4.320.0130.07318.90
5.4.310.0070.07719.04
5.4.300.0030.07319.11
5.4.290.0100.07319.02
5.4.280.0030.04319.07
5.4.270.0030.07318.94
5.4.260.0030.04018.83
5.4.250.0100.06319.02
5.4.240.0130.06319.02
5.4.230.0070.04719.09
5.4.220.0030.08019.11
5.4.210.0070.08018.91
5.4.200.0030.07019.16
5.4.190.0170.06718.89
5.4.180.0070.07018.97
5.4.170.0070.05018.96
5.4.160.0000.04318.80
5.4.150.0070.08018.94
5.4.140.0070.04316.32
5.4.130.0070.07716.43
5.4.120.0130.06316.34
5.4.110.0030.06716.36
5.4.100.0070.05716.48
5.4.90.0030.06016.41
5.4.80.0100.07716.39
5.4.70.0030.06016.47
5.4.60.0070.07316.18
5.4.50.0030.04016.39
5.4.40.0100.04316.25
5.4.30.0000.07716.41
5.4.20.0030.06716.37
5.4.10.0000.05716.40
5.4.00.0030.07315.58
5.3.290.0030.07714.67
5.3.280.0030.07014.47
5.3.270.0030.04014.59
5.3.260.0000.06714.44
5.3.250.0070.04314.48
5.3.240.0000.07714.61
5.3.230.0030.07314.48
5.3.220.0100.06714.45
5.3.210.0100.06314.55
5.3.200.0000.07014.57
5.3.190.0070.08014.58
5.3.180.0100.03314.40
5.3.170.0070.07014.45
5.3.160.0070.07314.42
5.3.150.0030.06314.45
5.3.140.0100.07014.57
5.3.130.0000.08714.57
5.3.120.0100.06314.54
5.3.110.0100.03714.53
5.3.100.0070.07714.02
5.3.90.0030.04014.04
5.3.80.0000.07713.89
5.3.70.0000.08713.81
5.3.60.0130.06314.03
5.3.50.0130.06713.83
5.3.40.0030.07313.95
5.3.30.0100.06313.70
5.3.20.0030.06013.69
5.3.10.0070.03713.66
5.3.00.0030.07313.52
5.2.170.0030.05711.17
5.2.160.0070.05711.03
5.2.150.0030.06711.13
5.2.140.0030.03311.21
5.2.130.0030.06011.05
5.2.120.0000.06010.92
5.2.110.0070.06010.97
5.2.100.0030.05710.96
5.2.90.0070.06010.97
5.2.80.0130.05711.16
5.2.70.0100.06011.08
5.2.60.0030.05311.13
5.2.50.0170.05311.00
5.2.40.0030.06310.81
5.2.30.0070.05310.98
5.2.20.0000.06311.05
5.2.10.0030.04710.73
5.2.00.0070.05010.59
5.1.60.0070.04310.12
5.1.50.0070.05010.02
5.1.40.0030.02710.00
5.1.30.0100.02010.44
5.1.20.0100.04710.51
5.1.10.0130.04010.16
5.1.00.0030.03710.17
5.0.50.0030.0378.42
5.0.40.0030.0438.52
5.0.30.0070.0478.15
5.0.20.0070.0408.06
5.0.10.0100.0208.31
5.0.00.0030.0578.18
4.4.90.0000.0307.17
4.4.80.0070.0207.17
4.4.70.0030.0337.17
4.4.60.0070.0207.17
4.4.50.0030.0337.17
4.4.40.0030.0307.17
4.4.30.0030.0237.17
4.4.20.0000.0407.17
4.4.10.0030.0377.17
4.4.00.0030.0337.17
4.3.110.0000.0377.17
4.3.100.0000.0177.17
4.3.90.0030.0337.17
4.3.80.0030.0237.17
4.3.70.0030.0277.17
4.3.60.0030.0237.17
4.3.50.0030.0237.17
4.3.40.0000.0437.17
4.3.30.0000.0307.17
4.3.20.0000.0407.17
4.3.10.0070.0307.17
4.3.00.0030.0337.17

preferences:
55.98 ms | 401 KiB | 5 Q