3v4l.org

run code in 300+ PHP versions simultaneously
<?php $intj = 5; $arrformfields[$intj][3] = 'ok'; ${$arrformfields[$intj][3]} = '1990'; $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.0150.00616.75
8.3.50.0220.00816.59
8.3.40.0150.00018.71
8.3.30.0040.01118.79
8.3.20.0000.00918.62
8.3.10.0040.00420.57
8.3.00.0060.00319.50
8.2.180.0180.00317.00
8.2.170.0030.01022.96
8.2.160.0140.00421.07
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0040.00420.95
8.2.110.0070.00321.02
8.2.100.0120.00018.03
8.2.90.0050.00519.41
8.2.80.0050.00219.21
8.2.70.0040.00417.88
8.2.60.0000.00818.05
8.2.50.0030.00618.07
8.2.40.0020.00518.18
8.2.30.0040.00418.20
8.2.20.0040.00417.72
8.2.10.0070.00017.88
8.2.00.0030.00717.83
8.1.280.0070.01425.92
8.1.270.0000.00724.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00322.61
8.1.230.0040.00820.92
8.1.220.0040.00417.78
8.1.210.0090.00018.96
8.1.200.0030.00617.35
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0040.00420.70
8.1.160.0050.00218.84
8.1.150.0070.00018.64
8.1.140.0050.00217.52
8.1.130.0030.00317.78
8.1.120.0070.00017.54
8.1.110.0050.00317.46
8.1.100.0040.00417.48
8.1.90.0050.00217.40
8.1.80.0080.00017.36
8.1.70.0120.00017.45
8.1.60.0080.00017.49
8.1.50.0040.00417.52
8.1.40.0060.00317.62
8.1.30.0000.00717.66
8.1.20.0000.00817.68
8.1.10.0000.00817.65
8.1.00.0040.00417.41
8.0.300.0040.00419.87
8.0.290.0040.00416.75
8.0.280.0030.00318.46
8.0.270.0030.00317.22
8.0.260.0050.00416.82
8.0.250.0040.00417.02
8.0.240.0050.00216.91
8.0.230.0040.00417.03
8.0.220.0050.00516.98
8.0.210.0040.00417.01
8.0.200.0000.00717.01
8.0.190.0040.00417.04
8.0.180.0040.00417.05
8.0.170.0030.00517.00
8.0.160.0040.00316.97
8.0.150.0060.00616.85
8.0.140.0080.00216.95
8.0.130.0060.00013.45
8.0.120.0080.00016.84
8.0.110.0070.00016.77
8.0.100.0030.00316.98
8.0.90.0040.00417.05
8.0.80.0090.00616.92
8.0.70.0070.00317.04
8.0.60.0060.00316.84
8.0.50.0020.00516.86
8.0.30.0130.00716.98
8.0.20.0180.00717.04
8.0.10.0050.00217.14
8.0.00.0070.01516.87
7.4.330.0060.00013.08
7.4.320.0000.00716.58
7.4.300.0040.00416.46
7.4.290.0070.00016.64
7.4.280.0040.00416.50
7.4.270.0030.00316.63
7.4.260.0060.00013.29
7.4.250.0040.00416.43
7.4.240.0070.00016.63
7.4.230.0000.00716.49
7.4.220.0090.01316.60
7.4.210.0080.00716.53
7.4.200.0050.00316.38
7.4.190.0030.00316.51
7.4.160.0090.00616.69
7.4.150.0100.00716.44
7.4.140.0100.01016.68
7.4.130.0080.01016.62
7.4.120.0110.00616.47
7.4.110.0100.00716.74
7.4.100.0090.00916.42
7.4.90.0070.01016.57
7.4.80.0090.00919.39
7.4.70.0130.00316.75
7.4.60.0090.01016.77
7.4.50.0040.00416.60
7.4.40.0090.00316.52
7.4.30.0080.00816.50
7.4.00.0000.01115.02
7.3.330.0000.00613.41
7.3.320.0000.00513.33
7.3.310.0080.00016.39
7.3.300.0000.00716.48
7.3.290.0030.01116.38
7.3.280.0060.00916.40
7.3.270.0110.01116.49
7.3.260.0130.01216.52
7.3.250.0080.01316.36
7.3.240.0110.00516.42
7.3.230.0100.00716.59
7.3.210.0100.00716.48
7.3.200.0090.00916.45
7.3.190.0100.00716.40
7.3.180.0100.00716.53
7.3.170.0090.00616.54
7.3.160.0060.01016.45
7.3.120.0060.00614.96
7.3.00.0060.00316.86
7.2.330.0070.01316.54
7.2.320.0060.01316.78
7.2.310.0100.01016.66
7.2.300.0070.01016.83
7.2.290.0100.00716.33
7.2.130.0080.00817.02
7.2.120.0060.00917.13
7.2.110.0070.00416.93
7.2.100.0040.01216.69
7.2.90.0070.00717.07
7.2.80.0060.00917.02
7.2.70.0060.00917.13
7.2.60.0000.01317.11
7.2.50.0030.00917.01
7.2.40.0080.00417.00
7.2.30.0070.00716.81
7.2.20.0140.00316.75
7.2.10.0070.00716.94
7.2.00.0030.01017.02
7.1.250.0070.00315.86
7.1.240.0080.00815.54
7.1.230.0080.00415.62
7.1.220.0030.00715.91
7.1.210.0030.01015.84
7.1.200.0080.00715.70
7.1.190.0060.00615.60
7.1.180.0030.00915.74
7.1.170.0060.00615.99
7.1.160.0070.00715.77
7.1.150.0070.00316.01
7.1.140.0070.00315.98
7.1.130.0060.00615.90
7.1.120.0040.01115.62
7.1.110.0060.00315.61
7.1.100.0040.00715.82
7.1.90.0030.01015.76
7.1.80.0080.00815.78
7.1.70.0050.00416.53
7.1.60.0080.00817.69
7.1.50.0090.00916.46
7.1.40.0090.00315.61
7.1.30.0040.00815.85
7.1.20.0070.00315.92
7.1.10.0110.00015.45
7.1.00.0030.03819.16
7.0.330.0030.00715.14
7.0.320.0120.00315.30
7.0.310.0070.00415.18
7.0.300.0040.00815.08
7.0.290.0000.00915.31
7.0.280.0070.00315.33
7.0.270.0080.00815.32
7.0.260.0030.00815.38
7.0.250.0030.00715.48
7.0.240.0070.00715.38
7.0.230.0000.01115.45
7.0.220.0030.00315.41
7.0.210.0090.00315.14
7.0.200.0040.00416.08
7.0.190.0000.00915.15
7.0.180.0040.00815.15
7.0.170.0030.00315.43
7.0.160.0070.00415.27
7.0.150.0030.00415.06
7.0.140.0030.04018.71
7.0.130.0030.01015.50
7.0.120.0030.04218.78
7.0.110.0070.01015.20
7.0.100.0100.03017.80
7.0.90.0100.04217.60
7.0.80.0020.03917.74
7.0.70.0030.04617.71
7.0.60.0080.04317.70
7.0.50.0050.03817.83
7.0.40.0080.04516.80
7.0.30.0120.04216.67
7.0.20.0070.03816.77
7.0.10.0100.04316.79
7.0.00.0030.04316.69
5.6.380.0060.00613.96
5.6.370.0000.00814.43
5.6.360.0040.00814.56
5.6.350.0030.00714.61
5.6.340.0070.00314.23
5.6.330.0060.00314.41
5.6.320.0060.00614.47
5.6.310.0030.01114.64
5.6.300.0070.00414.47
5.6.290.0000.01314.57
5.6.280.0080.03717.60
5.6.270.0060.00614.58
5.6.260.0000.00814.38
5.6.250.0070.02717.59
5.6.240.0060.04417.55
5.6.230.0070.04017.51
5.6.220.0080.04317.58
5.6.210.0050.03017.47
5.6.200.0120.03317.75
5.6.190.0070.03517.76
5.6.180.0050.04517.65
5.6.170.0050.03717.82
5.6.160.0120.02217.88
5.6.150.0050.03617.61
5.6.140.0070.04317.88
5.6.130.0060.03017.85
5.6.120.0050.03417.77
5.6.110.0100.04317.78
5.6.100.0080.04317.72
5.6.90.0100.03517.69
5.6.80.0080.04017.49
5.6.70.0050.04517.32
5.6.60.0090.03817.37
5.6.50.0040.04217.27
5.6.40.0090.04217.28
5.6.30.0100.03817.37
5.6.20.0070.03817.36
5.6.10.0080.04017.48
5.6.00.0090.03717.45
5.5.380.0070.04515.68
5.5.370.0010.04515.96
5.5.360.0030.04515.89
5.5.350.0070.04415.73
5.5.340.0050.04716.16
5.5.330.0100.04016.00
5.5.320.0050.04216.10
5.5.310.0050.02815.86
5.5.300.0050.04315.76
5.5.290.0030.03315.93
5.5.280.0030.02815.88
5.5.270.0070.03816.04
5.5.260.0080.04315.99
5.5.250.0050.04315.93
5.5.240.0050.04615.48
5.5.230.0100.03715.61
5.5.220.0050.03015.68
5.5.210.0070.03715.56
5.5.200.0070.04215.70
5.5.190.0050.04215.59
5.5.180.0020.04715.66
5.5.170.0000.00710.98
5.5.160.0070.02615.68
5.5.150.0170.02815.53
5.5.140.0050.04215.60
5.5.130.0050.04515.72
5.5.120.0040.04415.73
5.5.110.0050.04015.72
5.5.100.0050.03315.65
5.5.90.0080.02715.67
5.5.80.0070.03915.60
5.5.70.0030.04715.44
5.5.60.0050.04015.67
5.5.50.0000.02815.55
5.5.40.0050.03015.72
5.5.30.0030.03615.64
5.5.20.0030.04515.45
5.5.10.0030.03515.64
5.5.00.0070.03815.48
5.4.450.0030.02515.36
5.4.440.0030.04215.20
5.4.430.0110.03615.29
5.4.420.0030.04715.16
5.4.410.0100.03515.14
5.4.400.0050.04215.13
5.4.390.0080.03814.90
5.4.380.0120.03514.93
5.4.370.0100.03815.12
5.4.360.0080.04115.16
5.4.350.0000.04915.03
5.4.340.0080.04015.07
5.4.330.0030.00911.36
5.4.320.0080.03515.07
5.4.310.0050.03914.97
5.4.300.0070.03914.93
5.4.290.0050.02315.04
5.4.280.0030.03814.98
5.4.270.0020.03715.11
5.4.260.0110.03614.98
5.4.250.0050.04114.96
5.4.240.0050.03614.91
5.4.230.0090.03915.01
5.4.220.0000.04815.08
5.4.210.0070.04514.99
5.4.200.0050.04114.86
5.4.190.0020.04315.11
5.4.180.0060.04315.01
5.4.170.0070.03815.00
5.4.160.0100.03115.02
5.4.150.0030.02615.04
5.4.140.0050.02313.76
5.4.130.0030.03813.63
5.4.120.0020.04013.57
5.4.110.0020.04313.76
5.4.100.0080.03513.59
5.4.90.0050.03813.77
5.4.80.0070.01713.72
5.4.70.0030.03013.68
5.4.60.0030.02413.69
5.4.50.0030.02013.67
5.4.40.0050.01813.80
5.4.30.0060.01913.62
5.4.20.0030.01913.63
5.4.10.0030.01913.85
5.4.00.0030.01813.33
5.3.290.0040.03512.53
5.3.280.0060.03912.49
5.3.270.0030.02612.58
5.3.260.0030.03912.56
5.3.250.0050.02812.57
5.3.240.0050.02512.53
5.3.230.0120.03312.60
5.3.220.0050.03112.56
5.3.210.0060.04312.41
5.3.200.0050.03212.47
5.3.190.0050.03612.52
5.3.180.0030.03712.50
5.3.170.0050.02012.48
5.3.160.0000.02512.59
5.3.150.0020.02212.50
5.3.140.0030.03112.59
5.3.130.0020.02412.59
5.3.120.0000.02312.55
5.3.110.0030.02912.60
5.3.100.0040.02012.33
5.3.90.0050.01612.24
5.3.80.0030.02112.22
5.3.70.0020.02312.21
5.3.60.0030.02412.13
5.3.50.0060.01512.20
5.3.40.0030.03312.09
5.3.30.0030.02412.18
5.3.20.0070.03912.01
5.3.10.0030.03311.95
5.3.00.0040.02411.94
5.2.170.0060.02010.63
5.2.160.0050.01610.67
5.2.150.0000.02110.63
5.2.140.0020.02110.73
5.2.130.0000.01710.65
5.2.120.0050.03210.69
5.2.110.0020.03110.62
5.2.100.0030.03310.71
5.2.90.0020.03510.68
5.2.80.0090.02810.62
5.2.70.0050.01910.69
5.2.60.0020.01910.68
5.2.50.0020.01810.58
5.2.40.0000.02110.62
5.2.30.0020.01810.65
5.2.20.0050.02810.62
5.2.10.0000.01610.61
5.2.00.0000.01910.55
5.1.60.0000.02210.06
5.1.50.0030.01510.08
5.1.40.0000.02110.16
5.1.30.0040.01910.31
5.1.20.0050.01310.31
5.1.10.0080.01310.21
5.1.00.0030.01610.22
5.0.50.0030.0139.41
5.0.40.0000.0119.40
5.0.30.0020.0159.25
5.0.20.0020.0109.30
5.0.10.0030.0109.27
5.0.00.0000.0309.26
4.4.90.0030.0158.58
4.4.80.0020.0108.58
4.4.70.0020.0098.58
4.4.60.0080.0118.58
4.4.50.0040.0108.58
4.4.40.0000.0228.58
4.4.30.0000.0128.58
4.4.20.0000.0108.58
4.4.10.0020.0088.58
4.4.00.0020.0138.58
4.3.110.0020.0108.58
4.3.100.0020.0128.58
4.3.90.0050.0098.58
4.3.80.0030.0138.58
4.3.70.0030.0138.58
4.3.60.0000.0108.58
4.3.50.0020.0088.58
4.3.40.0020.0138.58
4.3.30.0000.0118.58
4.3.20.0000.0108.58
4.3.10.0000.0138.58
4.3.00.0000.0158.58

preferences:
42.67 ms | 401 KiB | 5 Q