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;'; $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.0030.01116.50
8.3.50.0140.00821.98
8.3.40.0140.00018.84
8.3.30.0060.01219.08
8.3.20.0070.00020.29
8.3.10.0030.00623.71
8.3.00.0040.00420.68
8.2.180.0070.01118.29
8.2.170.0090.00622.96
8.2.160.0090.00622.12
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0000.00722.26
8.2.110.0030.00622.12
8.2.100.0120.00017.78
8.2.90.0040.00419.40
8.2.80.0000.00917.97
8.2.70.0040.00717.61
8.2.60.0080.00017.93
8.2.50.0050.00318.07
8.2.40.0060.00318.34
8.2.30.0040.00418.14
8.2.20.0000.00817.68
8.2.10.0030.00619.53
8.2.00.0000.00717.70
8.1.280.0110.00425.92
8.1.270.0060.00323.95
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0000.00924.02
8.1.230.0080.00419.09
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.48
8.1.190.0000.00817.63
8.1.180.0030.00618.10
8.1.170.0040.00418.61
8.1.160.0000.00822.04
8.1.150.0030.00518.67
8.1.140.0040.00417.48
8.1.130.0030.00317.77
8.1.120.0030.00517.57
8.1.110.0050.00217.46
8.1.100.0040.00417.48
8.1.90.0000.00717.52
8.1.80.0080.00017.38
8.1.70.0030.00317.43
8.1.60.0000.00817.50
8.1.50.0050.00317.57
8.1.40.0040.00417.61
8.1.30.0090.00017.66
8.1.20.0030.00517.64
8.1.10.0040.00817.60
8.1.00.0080.00017.52
8.0.300.0070.00018.77
8.0.290.0000.00717.18
8.0.280.0000.00718.38
8.0.270.0000.00717.27
8.0.260.0030.00316.91
8.0.250.0030.00316.98
8.0.240.0000.00716.92
8.0.230.0050.00317.00
8.0.220.0030.00316.81
8.0.210.0040.00416.99
8.0.200.0070.00016.91
8.0.190.0050.00317.05
8.0.180.0030.00416.98
8.0.170.0060.00317.00
8.0.160.0040.00416.89
8.0.150.0000.00716.80
8.0.140.0030.00716.93
8.0.130.0000.00613.28
8.0.120.0040.00416.79
8.0.110.0040.00416.91
8.0.100.0040.00416.95
8.0.90.0070.00016.82
8.0.80.0070.00816.98
8.0.70.0020.00516.80
8.0.60.0040.00416.92
8.0.50.0000.00816.95
8.0.30.0100.00917.25
8.0.20.0100.00817.40
8.0.10.0020.00517.00
8.0.00.0100.00716.68
7.4.330.0050.00015.00
7.4.320.0030.00316.56
7.4.300.0000.00616.62
7.4.290.0070.00016.49
7.4.280.0070.00316.61
7.4.270.0070.00016.45
7.4.260.0070.00016.38
7.4.250.0030.00316.50
7.4.240.0040.00416.59
7.4.230.0070.00016.54
7.4.220.0060.01316.55
7.4.210.0070.00716.68
7.4.200.0070.00016.41
7.4.190.0070.00016.44
7.4.160.0130.00716.27
7.4.150.0000.01817.40
7.4.140.0130.00717.86
7.4.130.0100.00716.48
7.4.120.0090.01216.54
7.4.110.0120.00916.59
7.4.100.0120.01216.56
7.4.90.0150.00916.52
7.4.80.0070.01016.54
7.4.70.0090.01116.52
7.4.60.0130.01016.60
7.4.50.0000.00516.33
7.4.40.0080.00522.77
7.4.30.0140.00316.77
7.4.00.0030.01414.89
7.3.330.0000.00513.06
7.3.320.0000.00613.08
7.3.310.0000.00716.19
7.3.300.0030.00316.38
7.3.290.0100.00316.42
7.3.280.0090.00716.35
7.3.270.0150.00317.40
7.3.260.0150.00316.75
7.3.250.0100.00916.48
7.3.240.0060.01016.40
7.3.230.0100.00716.39
7.3.210.0070.01016.55
7.3.200.0000.01719.39
7.3.190.0060.01216.75
7.3.180.0130.00316.48
7.3.170.0070.01016.51
7.3.160.0090.01216.32
7.3.120.0060.00814.77
7.3.110.0070.01014.91
7.3.100.0040.00815.07
7.3.90.0130.00314.65
7.3.80.0000.01014.79
7.3.70.0030.01014.82
7.3.60.0070.01014.67
7.3.50.0000.01314.83
7.3.40.0090.00314.91
7.3.30.0060.00615.05
7.3.20.0090.00616.66
7.3.10.0000.01216.59
7.3.00.0070.00716.70
7.2.330.0060.01216.37
7.2.320.0100.00716.79
7.2.310.0130.00416.70
7.2.300.0120.00916.82
7.2.290.0090.00616.43
7.2.250.0060.01315.19
7.2.240.0040.01515.04
7.2.230.0040.01414.95
7.2.220.0110.00714.94
7.2.210.0030.00715.11
7.2.200.0040.01415.13
7.2.190.0040.01114.89
7.2.180.0060.00915.11
7.2.170.0070.00315.13
7.2.00.0120.01219.21
7.1.330.0070.00715.88
7.1.320.0030.01515.63
7.1.310.0060.00615.82
7.1.300.0090.00015.95
7.1.290.0060.00616.00
7.1.280.0030.00915.55
7.1.270.0030.00615.86
7.1.260.0040.00715.87
7.1.100.0030.01018.29
7.1.70.0000.01017.19
7.1.60.0140.01119.27
7.1.50.0070.00716.90
7.1.00.0070.07322.45
7.0.200.0110.00316.60
7.0.140.0030.07022.00
7.0.80.0100.08319.86
7.0.70.0070.09019.93
7.0.60.0470.07319.98
7.0.50.0530.08020.20
7.0.40.0170.07020.03
7.0.30.0130.07720.08
7.0.20.0070.08320.18
7.0.10.0000.08720.09
7.0.00.0100.04320.10
5.6.280.0070.06721.02
5.6.230.0100.08020.69
5.6.220.0030.09020.57
5.6.210.0170.07020.59
5.6.200.0100.08321.00
5.6.190.0100.08320.96
5.6.180.0070.04321.09
5.6.170.0130.08021.09
5.6.160.0130.07721.08
5.6.150.0170.07021.07
5.6.140.0100.08721.00
5.6.130.0030.08320.96
5.6.120.0130.08021.05
5.6.110.0100.05320.96
5.6.100.0170.07721.09
5.6.90.0200.07021.09
5.6.80.0070.04020.49
5.6.70.0000.06320.46
5.6.60.0230.06720.31
5.6.50.0100.04020.33
5.6.40.0070.08320.50
5.6.30.0200.07320.32
5.6.20.0100.07320.39
5.6.10.0030.08020.39
5.6.00.0100.08020.47
5.5.370.0130.07720.50
5.5.360.0070.04720.44
5.5.350.0170.07020.39
5.5.340.0100.08020.94
5.5.330.0130.06720.93
5.5.320.0070.08020.79
5.5.310.0070.08720.89
5.5.300.0200.03320.94
5.5.290.0070.05020.81
5.5.280.0070.04020.86
5.5.270.0070.07320.91
5.5.260.0170.04020.91
5.5.250.0100.08020.68
5.5.240.0170.06720.18
5.5.230.0070.04720.29
5.5.220.0130.07020.26
5.5.210.0100.07320.32
5.5.200.0070.08320.23
5.5.190.0030.08020.27
5.5.180.0070.07320.24
5.5.160.0100.08020.25
5.5.150.0100.07320.15
5.5.140.0070.08320.23
5.5.130.0130.07020.27
5.5.120.0130.08020.00
5.5.110.0070.05320.13
5.5.100.0070.05320.19
5.5.90.0130.07020.13
5.5.80.0170.05020.08
5.5.70.0070.07020.15
5.5.60.0070.06720.16
5.5.50.0070.07020.07
5.5.40.0030.08719.94
5.5.30.0030.06020.09
5.5.20.0070.06020.13
5.5.10.0100.06720.14
5.5.00.0100.03320.12
5.4.450.0030.08019.42
5.4.440.0130.07319.44
5.4.430.0070.07019.36
5.4.420.0070.07719.11
5.4.410.0170.07019.24
5.4.400.0100.07319.13
5.4.390.0000.08019.07
5.4.380.0030.04319.03
5.4.370.0000.08019.12
5.4.360.0130.07018.96
5.4.350.0130.06718.96
5.4.340.0030.08319.12
5.4.320.0000.05319.06
5.4.310.0000.08019.12
5.4.300.0130.07319.11
5.4.290.0170.07019.22
5.4.280.0070.08018.96
5.4.270.0230.06719.09
5.4.260.0100.07318.80
5.4.250.0130.06719.05
5.4.240.0030.04019.02
5.4.230.0070.07719.04
5.4.220.0000.08018.80
5.4.210.0070.05718.89
5.4.200.0300.06019.03
5.4.190.0100.07719.08
5.4.180.0070.04318.93
5.4.170.0000.06319.13
5.4.160.0000.06019.00
5.4.150.0100.03319.00
5.4.140.0070.03316.35
5.4.130.0000.04016.32
5.4.120.0030.03316.07
5.4.110.0070.03716.39
5.4.100.0030.03016.44
5.4.90.0070.06716.43
5.4.80.0030.07716.25
5.4.70.0000.06016.29
5.4.60.0070.02716.19
5.4.50.0100.06316.41
5.4.40.0030.03316.24
5.4.30.0100.02716.34
5.4.20.0000.04016.23
5.4.10.0000.05316.23
5.4.00.0030.05015.88
5.3.290.0100.06314.66
5.3.280.0130.07014.48
5.3.270.0030.04314.48
5.3.260.0030.07714.61
5.3.250.0070.04314.60
5.3.240.0030.05714.48
5.3.230.0030.04714.61
5.3.220.0100.06714.42
5.3.210.0030.03714.55
5.3.200.0100.06314.57
5.3.190.0000.07014.57
5.3.180.0070.07014.57
5.3.170.0030.06014.45
5.3.160.0030.04314.42
5.3.150.0100.05314.53
5.3.140.0100.07014.57
5.3.130.0130.02714.58
5.3.120.0070.03314.40
5.3.110.0030.03714.56
5.3.100.0030.03713.89
5.3.90.0030.05313.86
5.3.80.0070.03314.03
5.3.70.0030.03314.04
5.3.60.0070.03714.03
5.3.50.0030.03713.74
5.3.40.0000.04013.95
5.3.30.0070.05013.79
5.3.20.0000.07313.62
5.3.10.0030.03313.67
5.3.00.0030.03313.62
5.2.170.0000.03311.01
5.2.160.0030.03711.00
5.2.150.0000.03311.04
5.2.140.0030.02710.98
5.2.130.0000.03711.11
5.2.120.0000.03010.99
5.2.110.0000.03311.20
5.2.100.0100.03711.12
5.2.90.0100.03011.17
5.2.80.0000.03711.14
5.2.70.0000.03011.16
5.2.60.0070.03310.92
5.2.50.0030.02711.09
5.2.40.0000.03711.10
5.2.30.0170.01710.99
5.2.20.0000.04010.91
5.2.10.0030.02710.91
5.2.00.0030.02710.91
5.1.60.0000.03310.91
5.1.50.0070.02310.91
5.1.40.0030.02710.91
5.1.30.0000.04310.91
5.1.20.0000.05310.91
5.1.10.0000.05710.91
5.1.00.0070.04310.91
5.0.50.0000.02310.91
5.0.40.0000.02010.91
5.0.30.0000.06310.91
5.0.20.0000.04710.91
5.0.10.0000.04710.91
5.0.00.0000.06310.91
4.4.90.0030.02310.91
4.4.80.0000.03310.91
4.4.70.0030.01310.91
4.4.60.0070.01010.91
4.4.50.0070.01710.91
4.4.40.0000.02710.91
4.4.30.0000.01710.91
4.4.20.0030.01310.91
4.4.10.0000.03010.91
4.4.00.0000.02310.91
4.3.110.0030.01310.91
4.3.100.0000.03310.91
4.3.90.0070.03010.91
4.3.80.0030.05710.91
4.3.70.0000.03310.91
4.3.60.0030.03310.91
4.3.50.0070.03010.91
4.3.40.0030.05010.91
4.3.30.0000.04010.91
4.3.20.0000.03710.91
4.3.10.0000.03010.91
4.3.00.0000.03310.91

preferences:
38.93 ms | 401 KiB | 5 Q