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 = 'qsd;qsd'; $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.01016.75
8.3.50.0210.00722.10
8.3.40.0120.00318.88
8.3.30.0180.00419.13
8.3.20.0080.00020.04
8.3.10.0080.00023.53
8.3.00.0090.00022.44
8.2.180.0070.01118.16
8.2.170.0150.00022.96
8.2.160.0070.00721.96
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00822.11
8.2.110.0040.00822.13
8.2.100.0030.00917.97
8.2.90.0080.00019.35
8.2.80.0050.00317.97
8.2.70.0090.00017.63
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0000.00719.34
8.2.30.0080.00018.16
8.2.20.0000.00717.81
8.2.10.0000.00819.47
8.2.00.0050.00317.87
8.1.280.0070.01125.92
8.1.270.0030.00622.19
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0090.00023.82
8.1.230.0040.00817.52
8.1.220.0050.00317.77
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0030.00617.52
8.1.180.0080.00018.10
8.1.170.0030.00518.37
8.1.160.0000.00822.05
8.1.150.0000.00718.57
8.1.140.0000.00817.48
8.1.130.0000.00717.86
8.1.120.0040.00417.53
8.1.110.0040.00417.38
8.1.100.0000.00817.52
8.1.90.0000.00717.49
8.1.80.0040.00417.50
8.1.70.0030.00317.45
8.1.60.0030.00517.53
8.1.50.0030.00517.58
8.1.40.0070.00017.44
8.1.30.0080.00017.50
8.1.20.0000.00717.59
8.1.10.0020.00517.57
8.1.00.0040.00417.45
8.0.300.0000.00718.77
8.0.290.0030.00516.75
8.0.280.0040.00418.39
8.0.270.0030.00317.16
8.0.260.0060.00316.90
8.0.250.0030.00317.01
8.0.240.0000.00816.98
8.0.230.0020.00516.96
8.0.220.0050.00316.84
8.0.210.0030.00316.83
8.0.200.0030.00316.87
8.0.190.0000.00716.85
8.0.180.0040.00416.85
8.0.170.0000.00716.92
8.0.160.0040.00416.80
8.0.150.0000.00716.89
8.0.140.0000.00816.79
8.0.130.0030.00313.31
8.0.120.0050.00316.77
8.0.110.0070.00017.00
8.0.100.0040.00417.00
8.0.90.0030.00516.97
8.0.80.0140.00616.91
8.0.70.0000.00716.83
8.0.60.0000.00816.74
8.0.50.0040.00416.95
8.0.30.0120.00716.94
8.0.20.0080.01117.40
8.0.10.0000.00716.83
8.0.00.0070.01016.88
7.4.330.0030.00315.04
7.4.320.0000.00616.56
7.4.300.0030.00316.53
7.4.290.0030.00316.44
7.4.280.0050.00216.45
7.4.270.0000.00716.53
7.4.260.0050.00316.64
7.4.250.0040.00416.49
7.4.240.0030.00416.55
7.4.230.0000.00716.45
7.4.220.0070.01016.64
7.4.210.0080.00716.58
7.4.200.0050.00216.61
7.4.190.0080.00016.34
7.4.160.0090.00916.59
7.4.150.0140.00317.40
7.4.140.0080.01317.86
7.4.130.0090.00916.51
7.4.120.0050.01216.60
7.4.110.0100.00916.55
7.4.100.0170.00716.55
7.4.90.0100.00716.61
7.4.80.0130.00316.48
7.4.70.0060.01116.51
7.4.60.0070.01016.61
7.4.50.0000.00416.56
7.4.40.0090.00922.77
7.4.30.0080.00816.52
7.4.00.0040.01114.97
7.3.330.0000.00613.07
7.3.320.0000.00513.35
7.3.310.0030.00316.45
7.3.300.0070.00016.20
7.3.290.0100.00716.38
7.3.280.0090.00816.34
7.3.270.0090.01317.40
7.3.260.0100.01416.74
7.3.250.0090.01216.45
7.3.240.0070.01016.58
7.3.230.0130.00416.39
7.3.210.0120.00616.27
7.3.200.0030.01419.39
7.3.190.0110.01116.20
7.3.180.0030.01316.39
7.3.170.0080.00816.46
7.3.160.0100.00716.43
7.3.120.0130.00514.78
7.3.110.0040.01514.79
7.3.100.0140.00015.08
7.3.90.0040.00714.85
7.3.80.0080.00814.71
7.3.70.0090.00614.77
7.3.60.0040.01114.80
7.3.50.0040.01214.77
7.3.40.0000.01415.09
7.3.30.0090.00314.98
7.3.20.0030.01016.88
7.3.10.0090.00516.72
7.3.00.0060.00916.73
7.2.330.0100.01016.85
7.2.320.0120.01116.86
7.2.310.0060.01616.51
7.2.300.0000.02016.79
7.2.290.0090.00616.64
7.2.250.0040.01114.87
7.2.240.0140.00715.03
7.2.230.0100.00715.24
7.2.220.0090.00615.30
7.2.210.0090.00614.99
7.2.200.0060.00315.22
7.2.190.0070.01015.14
7.2.180.0040.01115.04
7.2.170.0060.00915.07
7.2.130.0070.01016.71
7.2.120.0080.00416.97
7.2.110.0060.00916.89
7.2.100.0070.00717.17
7.2.90.0070.00717.04
7.2.80.0060.00916.84
7.2.70.0100.00317.21
7.2.60.0030.01016.86
7.2.50.0070.00717.01
7.2.40.0070.00317.03
7.2.30.0070.00716.99
7.2.20.0030.00616.94
7.2.10.0030.01316.79
7.2.00.0050.00918.15
7.1.330.0040.01115.79
7.1.320.0030.00915.95
7.1.310.0060.00315.81
7.1.300.0050.00515.58
7.1.290.0070.00315.85
7.1.280.0040.01215.82
7.1.270.0070.00715.90
7.1.260.0060.01015.95
7.1.250.0100.00715.99
7.1.100.0000.01217.88
7.1.70.0000.01016.89
7.1.60.0100.01319.29
7.1.50.0100.01416.91
7.1.00.0000.08022.33
7.0.200.0110.00016.63
7.0.140.0000.07022.15
7.0.80.0670.05319.96
7.0.70.0430.04319.95
7.0.60.0070.08319.94
7.0.50.0470.04020.34
7.0.40.0130.07320.08
7.0.30.0100.05720.09
7.0.20.0030.09020.09
7.0.10.0000.05720.09
7.0.00.0030.05720.07
5.6.280.0070.07021.03
5.6.230.0030.07320.57
5.6.220.0130.06720.59
5.6.210.0100.07320.66
5.6.200.0070.05721.00
5.6.190.0100.08021.04
5.6.180.0130.05021.15
5.6.170.0100.04721.07
5.6.160.0170.06721.03
5.6.150.0100.07721.19
5.6.140.0030.07320.96
5.6.130.0030.08721.05
5.6.120.0130.08020.96
5.6.110.0100.10321.08
5.6.100.0130.07720.95
5.6.90.0170.07721.03
5.6.80.0170.07020.38
5.6.70.0070.07720.46
5.6.60.0100.07720.41
5.6.50.0070.08320.44
5.6.40.0300.04020.45
5.6.30.0100.05320.48
5.6.20.0030.05020.53
5.6.10.0070.04320.43
5.6.00.0070.06020.45
5.5.370.0130.07320.52
5.5.360.0070.08320.49
5.5.350.0100.04720.47
5.5.340.0100.07320.80
5.5.330.0130.08020.78
5.5.320.0170.06720.84
5.5.310.0130.09720.80
5.5.300.0030.05020.93
5.5.290.0130.05320.65
5.5.280.0000.08720.74
5.5.270.0030.09320.82
5.5.260.0070.06720.89
5.5.250.0030.05720.68
5.5.240.0200.07020.32
5.5.230.0030.09320.30
5.5.220.0170.07020.02
5.5.210.0030.04720.03
5.5.200.0100.07720.24
5.5.190.0070.07320.16
5.5.180.0030.05720.12
5.5.160.0000.05020.15
5.5.150.0130.07020.27
5.5.140.0000.06720.16
5.5.130.0030.08720.29
5.5.120.0030.06020.19
5.5.110.0030.04720.26
5.5.100.0130.06320.13
5.5.90.0070.04020.09
5.5.80.0030.07320.04
5.5.70.0100.03319.98
5.5.60.0030.08020.02
5.5.50.0030.05020.16
5.5.40.0070.05320.06
5.5.30.0070.04319.96
5.5.20.0070.08020.10
5.5.10.0070.03320.17
5.5.00.0070.07320.06
5.4.450.0000.04319.36
5.4.440.0070.06719.44
5.4.430.0100.09319.43
5.4.420.0100.04319.28
5.4.410.0070.07319.34
5.4.400.0070.07719.18
5.4.390.0030.08319.13
5.4.380.0030.08319.10
5.4.370.0000.05019.12
5.4.360.0070.08018.97
5.4.350.0070.07719.07
5.4.340.0130.07018.78
5.4.320.0030.05719.10
5.4.310.0200.03719.22
5.4.300.0130.05019.05
5.4.290.0000.05318.78
5.4.280.0100.05718.97
5.4.270.0100.07319.11
5.4.260.0100.06718.94
5.4.250.0030.07019.11
5.4.240.0000.04719.02
5.4.230.0030.03719.09
5.4.220.0100.04019.11
5.4.210.0000.04319.09
5.4.200.0070.07319.02
5.4.190.0030.08019.02
5.4.180.0070.08019.09
5.4.170.0000.03719.05
5.4.160.0100.06319.09
5.4.150.0030.07019.04
5.4.140.0030.04316.24
5.4.130.0070.06016.42
5.4.120.0070.03316.26
5.4.110.0070.07316.20
5.4.100.0100.07316.36
5.4.90.0070.07316.22
5.4.80.0100.03016.20
5.4.70.0030.06016.32
5.4.60.0030.07716.46
5.4.50.0070.06716.29
5.4.40.0030.07716.25
5.4.30.0100.06316.29
5.4.20.0000.04016.23
5.4.10.0070.07716.41
5.4.00.0070.04015.79
5.3.290.0030.04014.60
5.3.280.0030.03714.45
5.3.270.0000.05714.57
5.3.260.0030.08014.49
5.3.250.0070.03714.48
5.3.240.0070.07314.48
5.3.230.0000.03714.47
5.3.220.0170.06314.54
5.3.210.0070.07314.42
5.3.200.0100.05014.52
5.3.190.0070.08014.56
5.3.180.0000.05314.54
5.3.170.0070.03314.52
5.3.160.0070.07714.45
5.3.150.0000.08014.45
5.3.140.0070.07714.54
5.3.130.0100.07014.56
5.3.120.0100.03314.50
5.3.110.0070.03714.52
5.3.100.0000.04014.05
5.3.90.0100.07013.90
5.3.80.0170.06713.90
5.3.70.0100.07014.03
5.3.60.0030.04714.00
5.3.50.0100.06313.73
5.3.40.0130.07013.83
5.3.30.0070.07013.79
5.3.20.0030.07713.57
5.3.10.0030.04313.54
5.3.00.0100.05713.67
5.2.170.0070.04711.17
5.2.160.0030.06311.00
5.2.150.0100.05311.00
5.2.140.0130.05311.03
5.2.130.0070.06011.20
5.2.120.0030.05711.13
5.2.110.0030.06011.13
5.2.100.0070.04711.11
5.2.90.0000.03311.16
5.2.80.0070.06011.00
5.2.70.0000.04011.00
5.2.60.0030.03011.09
5.2.50.0100.05711.09
5.2.40.0070.04711.00
5.2.30.0030.06011.00
5.2.20.0070.03311.02
5.2.10.0000.04011.00
5.2.00.0030.03711.00
5.1.60.0030.04011.00
5.1.50.0000.04011.00
5.1.40.0000.03711.00
5.1.30.0000.06311.00
5.1.20.0000.02711.00
5.1.10.0030.05311.00
5.1.00.0070.04311.00
5.0.50.0030.04711.00
5.0.40.0030.03311.00
5.0.30.0000.03311.00
5.0.20.0000.02011.00
5.0.10.0000.05011.00
5.0.00.0070.04711.00
4.4.90.0000.01711.00
4.4.80.0000.03711.00
4.4.70.0000.03311.00
4.4.60.0070.02011.00
4.4.50.0000.03711.00
4.4.40.0030.05311.00
4.4.30.0000.04011.00
4.4.20.0000.04011.00
4.4.10.0030.03711.00
4.4.00.0030.05311.00
4.3.110.0030.02711.00
4.3.100.0030.02711.00
4.3.90.0030.02011.00
4.3.80.0000.04011.00
4.3.70.0100.02711.00
4.3.60.0030.02711.00
4.3.50.0000.04711.00
4.3.40.0030.03311.00
4.3.30.0030.01711.00
4.3.20.0000.02011.00
4.3.10.0000.03711.00
4.3.00.0000.04011.00

preferences:
45.05 ms | 400 KiB | 5 Q