3v4l.org

run code in 300+ PHP versions simultaneously
<?php $intj = 5; $arrformfields[$intj][3] = 'ok'; $arrformfields[$intj][18] = 'ok2'; ${$arrformfields[$intj][3]} = '1990'; ${$arrformfields[$intj][18]} = 4; $value = '1989;1950'; $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 OR ${$arrformfields[$intj][3]} > $intyearstart)) OR ${$arrformfields[$intj][3]} < $intyearstart OR ${$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"; } } else if (${$arrformfields[$intj][3]} < $intyearstart) { //"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.0140.00316.50
8.3.50.0220.00922.06
8.3.40.0150.00418.84
8.3.30.0110.00319.22
8.3.20.0110.00720.34
8.3.10.0040.00423.63
8.3.00.0140.00619.38
8.2.180.0150.00418.54
8.2.170.0160.00322.96
8.2.160.0100.01020.52
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00022.21
8.2.110.0060.00321.97
8.2.100.0060.00617.78
8.2.90.0040.00419.35
8.2.80.0030.00518.03
8.2.70.0030.00617.63
8.2.60.0080.00017.93
8.2.50.0000.00918.07
8.2.40.0040.00418.22
8.2.30.0040.00418.08
8.2.20.0040.00417.83
8.2.10.0050.00218.03
8.2.00.0030.00617.70
8.1.280.0130.00625.92
8.1.270.0090.00623.88
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0030.00623.75
8.1.230.0040.01119.16
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.50
8.1.180.0080.00018.10
8.1.170.0030.00918.58
8.1.160.0000.00721.96
8.1.150.0070.00018.60
8.1.140.0070.00017.42
8.1.130.0000.00717.86
8.1.120.0050.00317.42
8.1.110.0030.00517.45
8.1.100.0070.00017.49
8.1.90.0030.00317.37
8.1.80.0000.00717.51
8.1.70.0000.00717.45
8.1.60.0030.00617.50
8.1.50.0000.00917.60
8.1.40.0000.00817.46
8.1.30.0050.00317.66
8.1.20.0050.00317.73
8.1.10.0000.00717.64
8.1.00.0000.00717.52
8.0.300.0030.00618.77
8.0.290.0080.00017.18
8.0.280.0040.00418.47
8.0.270.0040.00417.20
8.0.260.0070.00016.77
8.0.250.0020.00516.86
8.0.240.0050.00516.88
8.0.230.0040.00417.01
8.0.220.0000.00716.97
8.0.210.0070.00016.82
8.0.200.0040.00416.89
8.0.190.0030.00416.97
8.0.180.0000.00716.84
8.0.170.0040.00416.91
8.0.160.0070.00016.96
8.0.150.0040.00416.92
8.0.140.0000.00816.90
8.0.130.0060.00013.44
8.0.120.0060.00316.98
8.0.110.0000.00816.83
8.0.100.0000.00716.99
8.0.90.0050.00216.80
8.0.80.0030.01316.84
8.0.70.0040.00416.93
8.0.60.0050.00316.94
8.0.50.0030.00316.85
8.0.30.0100.01017.13
8.0.20.0120.01017.40
8.0.10.0040.00416.92
8.0.00.0080.00916.84
7.4.330.0060.00015.10
7.4.320.0000.00616.53
7.4.300.0030.00316.64
7.4.290.0040.00416.62
7.4.280.0030.00516.53
7.4.270.0040.00416.54
7.4.260.0030.00716.52
7.4.250.0070.00016.64
7.4.240.0040.00416.62
7.4.230.0000.00716.42
7.4.220.0040.02116.50
7.4.210.0070.00716.64
7.4.200.0040.00416.38
7.4.190.0070.00016.50
7.4.160.0100.00616.65
7.4.150.0060.01217.40
7.4.140.0100.00717.86
7.4.130.0110.00616.56
7.4.120.0080.01016.66
7.4.110.0030.01416.48
7.4.100.0090.00916.62
7.4.90.0060.01116.63
7.4.80.0180.00319.39
7.4.70.0100.00716.50
7.4.60.0080.00916.45
7.4.50.0000.00816.39
7.4.40.0100.00622.77
7.4.30.0120.00416.63
7.4.00.0050.01014.96
7.3.330.0000.00513.12
7.3.320.0050.00313.27
7.3.310.0030.00316.19
7.3.300.0000.00716.45
7.3.290.0070.00716.38
7.3.280.0070.01016.33
7.3.270.0030.01417.40
7.3.260.0170.00716.67
7.3.250.0070.01316.45
7.3.240.0100.01316.45
7.3.230.0100.00716.58
7.3.210.0140.02216.73
7.3.200.0130.00619.39
7.3.190.0140.00916.61
7.3.180.0030.01616.32
7.3.170.0060.00916.32
7.3.160.0140.00716.29
7.3.120.0050.01114.87
7.3.110.0100.00715.04
7.3.100.0090.00914.93
7.3.90.0060.00615.07
7.3.80.0090.00414.77
7.3.70.0070.00315.02
7.3.60.0100.00315.06
7.3.50.0000.01114.83
7.3.40.0060.01214.80
7.3.30.0030.00614.91
7.3.20.0070.00716.63
7.3.10.0070.01016.63
7.3.00.0060.00616.59
7.2.330.0100.00916.63
7.2.320.0000.01716.89
7.2.310.0170.00016.82
7.2.300.0120.00916.70
7.2.290.0070.01416.85
7.2.250.0070.01115.17
7.2.240.0100.01014.86
7.2.230.0090.00615.19
7.2.220.0120.00415.27
7.2.210.0030.01015.27
7.2.200.0100.00315.15
7.2.190.0090.00615.29
7.2.180.0110.00414.89
7.2.170.0110.00315.25
7.2.160.0070.00715.26
7.2.150.0120.00317.01
7.2.140.0120.00016.60
7.2.130.0030.01017.02
7.2.120.0030.01317.06
7.2.110.0070.01117.05
7.2.100.0070.00716.94
7.2.90.0080.00817.06
7.2.80.0130.00017.07
7.2.70.0070.00717.00
7.2.60.0030.00916.98
7.2.50.0110.00416.73
7.2.40.0060.00916.70
7.2.30.0030.00716.90
7.2.20.0030.01316.97
7.2.10.0060.00916.90
7.2.00.0060.00818.23
7.1.330.0030.01615.60
7.1.320.0070.00715.87
7.1.310.0030.01015.91
7.1.300.0030.01015.84
7.1.290.0000.01415.65
7.1.280.0040.00815.89
7.1.270.0030.01215.89
7.1.260.0030.01015.89
7.1.250.0090.00315.83
7.1.240.0030.01015.90
7.1.230.0060.01215.60
7.1.220.0030.01215.79
7.1.210.0000.01416.00
7.1.200.0030.01316.04
7.1.190.0070.00715.54
7.1.180.0080.00415.58
7.1.170.0160.00015.99
7.1.160.0170.00015.55
7.1.150.0040.01115.68
7.1.140.0030.00915.78
7.1.130.0030.00715.88
7.1.120.0040.01115.99
7.1.110.0040.00415.91
7.1.100.0080.00517.09
7.1.90.0000.01415.92
7.1.80.0090.00315.85
7.1.70.0060.00716.44
7.1.60.0070.01117.61
7.1.50.0030.01516.38
7.1.40.0040.00715.82
7.1.30.0040.01216.00
7.1.20.0030.01015.99
7.1.10.0100.00015.58
7.1.00.0030.04319.06
7.0.330.0000.00915.36
7.0.320.0070.01015.46
7.0.310.0040.01115.48
7.0.300.0060.00315.41
7.0.290.0060.00615.22
7.0.280.0040.00715.07
7.0.270.0000.01015.43
7.0.260.0090.00315.36
7.0.250.0080.00815.62
7.0.240.0040.00815.44
7.0.230.0030.00515.53
7.0.220.0040.00415.46
7.0.210.0040.00815.30
7.0.200.0040.00616.03
7.0.190.0040.00415.36
7.0.180.0090.00615.55
7.0.170.0030.01015.23
7.0.160.0120.00015.24
7.0.150.0070.00315.36
7.0.140.0050.04218.68
7.0.130.0030.00515.28
7.0.120.0060.00915.49
7.0.110.0060.00315.56
7.0.100.0070.04817.87
7.0.90.0050.04917.73
7.0.80.0100.03317.64
7.0.70.0070.03317.79
7.0.60.0100.03717.67
7.0.50.0050.03017.91
7.0.40.0050.03216.75
7.0.30.0040.02316.80
7.0.20.0040.04616.76
7.0.10.0070.04516.82
7.0.00.0080.02516.81
5.6.400.0040.00814.80
5.6.390.0060.00614.18
5.6.380.0030.01414.36
5.6.370.0040.00414.75
5.6.360.0030.01014.68
5.6.350.0000.01514.15
5.6.340.0040.00814.59
5.6.330.0030.01014.42
5.6.320.0000.01214.62
5.6.310.0040.00814.45
5.6.300.0080.00814.80
5.6.290.0000.01414.59
5.6.280.0050.04017.88
5.6.270.0000.00814.68
5.6.260.0000.01814.73
5.6.250.0030.04817.66
5.6.240.0050.04517.50
5.6.230.0100.04817.70
5.6.220.0050.04817.50
5.6.210.0070.04517.65
5.6.200.0100.02517.67
5.6.190.0070.02217.66
5.6.180.0050.02417.85
5.6.170.0030.02517.90
5.6.160.0050.02317.81
5.6.150.0100.02517.61
5.6.140.0060.02317.88
5.6.130.0100.04617.94
5.6.120.0050.04717.67
5.6.110.0070.04617.75
5.6.100.0050.03517.68
5.6.90.0050.03017.69
5.6.80.0100.03017.32
5.6.70.0070.03517.36
5.6.60.0080.04517.37
5.6.50.0090.04417.31
5.6.40.0070.02717.45
5.6.30.0080.04117.49
5.6.20.0030.04617.42
5.6.10.0070.04317.35
5.6.00.0090.03817.33
5.5.380.0050.04417.35
5.5.370.0070.02917.60
5.5.360.0030.04317.51
5.5.350.0070.03517.40
5.5.340.0060.03117.46
5.5.330.0050.02517.51
5.5.320.0060.03317.50
5.5.310.0070.04217.64
5.5.300.0050.02817.52
5.5.290.0020.04917.64
5.5.280.0090.02417.57
5.5.270.0000.04917.76
5.5.260.0100.04317.59
5.5.250.0050.04417.54
5.5.240.0050.02417.17
5.5.230.0120.03217.28
5.5.220.0120.04017.25
5.5.210.0080.02817.24
5.5.200.0050.04117.27
5.5.190.0000.04217.20
5.5.180.0100.04617.42
5.5.170.0060.00614.45
5.5.160.0080.03717.15
5.5.150.0050.04217.18
5.5.140.0120.02317.38
5.5.130.0080.02617.27
5.5.120.0080.03817.18
5.5.110.0100.03717.13
5.5.100.0070.04317.12
5.5.90.0030.02917.01
5.5.80.0100.03517.21
5.5.70.0070.04517.15
5.5.60.0030.04517.09
5.5.50.0050.02617.12
5.5.40.0050.04217.29
5.5.30.0040.04717.28
5.5.20.0110.03817.24
5.5.10.0050.04417.23
5.5.00.0030.04017.16
5.4.450.0020.02616.07
5.4.440.0090.04116.05
5.4.430.0050.03815.93
5.4.420.0000.04016.09
5.4.410.0070.04115.97
5.4.400.0120.03715.89
5.4.390.0050.03615.80
5.4.380.0050.02715.88
5.4.370.0070.03715.92
5.4.360.0050.04515.83
5.4.350.0060.03815.87
5.4.340.0050.04015.90
5.4.330.0030.00612.72
5.4.320.0120.03015.88
5.4.310.0070.03915.79
5.4.300.0050.03915.92
5.4.290.0050.03615.89
5.4.280.0030.02515.75
5.4.270.0120.03315.75
5.4.260.0040.02815.92
5.4.250.0080.02315.87
5.4.240.0080.03815.91
5.4.230.0100.02215.88
5.4.220.0030.03315.89
5.4.210.0110.03715.87
5.4.200.0080.02515.92
5.4.190.0050.03815.84
5.4.180.0080.03515.97
5.4.170.0030.04115.89
5.4.160.0040.03115.96
5.4.150.0070.04015.90
5.4.140.0050.03414.47
5.4.130.0050.02414.55
5.4.120.0090.03014.52
5.4.110.0050.03814.58
5.4.100.0080.03814.51
5.4.90.0020.03214.51
5.4.80.0020.04314.46
5.4.70.0090.03514.47
5.4.60.0040.04014.51
5.4.50.0020.04214.56
5.4.40.0050.03114.55
5.4.30.0080.03814.55
5.4.20.0030.02714.50
5.4.10.0120.03714.47
5.4.00.0050.03314.09
5.3.290.0080.03813.68
5.3.280.0060.02313.66
5.3.270.0100.03313.67
5.3.260.0030.04313.67
5.3.250.0010.03313.58
5.3.240.0110.02713.65
5.3.230.0050.02213.64
5.3.220.0020.03913.66
5.3.210.0080.03013.65
5.3.200.0070.03813.57
5.3.190.0050.03913.61
5.3.180.0050.03513.58
5.3.170.0030.04213.56
5.3.160.0090.03113.66
5.3.150.0050.03913.64
5.3.140.0050.02013.58
5.3.130.0040.03713.63
5.3.120.0070.03713.63
5.3.110.0020.04313.57
5.3.100.0070.03213.36
5.3.90.0030.04313.31
5.3.80.0070.03213.26
5.3.70.0050.03813.26
5.3.60.0130.03313.30
5.3.50.0050.01913.28
5.3.40.0060.01913.34
5.3.30.0020.03013.29
5.3.20.0000.03613.22
5.3.10.0070.04013.18
5.3.00.0020.04013.19
5.2.170.0030.06310.98
5.2.160.0070.02711.13
5.2.150.0030.06011.03
5.2.140.0070.05711.12
5.2.130.0000.03011.15
5.2.120.0030.06011.07
5.2.110.0000.03010.98
5.2.100.0030.06711.11
5.2.90.0030.05011.14
5.2.80.0100.05010.96
5.2.70.0000.06710.93
5.2.60.0000.06311.03
5.2.50.0070.04011.00
5.2.40.0130.05310.85
5.2.30.0100.04710.92
5.2.20.0100.04710.83
5.2.10.0130.04310.77
5.2.00.0030.06310.76
5.1.60.0070.04710.08
5.1.50.0030.03010.01
5.1.40.0100.02310.08
5.1.30.0070.02310.36
5.1.20.0030.05310.23
5.1.10.0070.05010.08
5.1.00.0030.03710.07
5.0.50.0030.0378.42
5.0.40.0030.0438.28
5.0.30.0030.0308.34
5.0.20.0070.0438.21
5.0.10.0000.0408.32
5.0.00.0030.0678.08
4.4.90.0030.0236.45
4.4.80.0000.0376.45
4.4.70.0070.0306.45
4.4.60.0000.0206.45
4.4.50.0000.0306.45
4.4.40.0030.0406.45
4.4.30.0000.0236.45
4.4.20.0030.0236.45
4.4.10.0030.0336.45
4.4.00.0000.0506.45
4.3.110.0100.0206.45
4.3.100.0030.0336.45
4.3.90.0030.0336.45
4.3.80.0030.0276.45
4.3.70.0070.0236.45
4.3.60.0000.0376.45
4.3.50.0000.0376.45
4.3.40.0070.0306.45
4.3.30.0000.0306.45
4.3.20.0000.0406.45
4.3.10.0030.0336.45
4.3.00.0030.0336.45

preferences:
72.44 ms | 401 KiB | 5 Q