3v4l.org

run code in 300+ PHP versions simultaneously
<?php $intj = 5; $arrformfields[$intj][3] = '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.0110.00418.31
8.3.50.0140.00122.05
8.3.40.0060.00918.84
8.3.30.0120.00319.03
8.3.20.0040.00418.91
8.3.10.0080.00821.09
8.3.00.0100.00721.75
8.2.180.0000.01616.88
8.2.170.0060.00922.96
8.2.160.0110.00420.47
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0040.00420.98
8.2.110.0070.00320.53
8.2.100.0000.01117.97
8.2.90.0050.00319.35
8.2.80.0030.00518.05
8.2.70.0050.00317.48
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0000.00818.22
8.2.30.0040.00419.41
8.2.20.0080.00017.88
8.2.10.0040.00417.75
8.2.00.0030.00617.88
8.1.280.0090.00925.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0090.00022.10
8.1.230.0110.00021.04
8.1.220.0000.00818.77
8.1.210.0080.00018.90
8.1.200.0060.00317.35
8.1.190.0080.00017.52
8.1.180.0080.00018.10
8.1.170.0030.00618.59
8.1.160.0070.00018.96
8.1.150.0070.00318.67
8.1.140.0040.00417.35
8.1.130.0000.00717.79
8.1.120.0050.00317.38
8.1.110.0000.00717.43
8.1.100.0030.00517.50
8.1.90.0030.00517.47
8.1.80.0020.00517.52
8.1.70.0030.00317.38
8.1.60.0030.00617.50
8.1.50.0040.00417.39
8.1.40.0030.00617.61
8.1.30.0000.00717.71
8.1.20.0090.00017.53
8.1.10.0050.00217.48
8.1.00.0080.00017.43
8.0.300.0000.00719.98
8.0.290.0070.00017.16
8.0.280.0000.00718.39
8.0.270.0070.00016.91
8.0.260.0030.00316.90
8.0.250.0070.00016.89
8.0.240.0080.00417.02
8.0.230.0030.00317.05
8.0.220.0030.00316.88
8.0.210.0000.00816.99
8.0.200.0070.00017.13
8.0.190.0030.00516.93
8.0.180.0030.00616.86
8.0.170.0060.00317.00
8.0.160.0050.00217.05
8.0.150.0030.00516.90
8.0.140.0040.00416.95
8.0.130.0000.00513.43
8.0.120.0040.00416.98
8.0.110.0000.00916.79
8.0.100.0070.00016.99
8.0.90.0000.00817.05
8.0.80.0040.01117.03
8.0.70.0050.00316.92
8.0.60.0040.00417.10
8.0.50.0040.00416.99
8.0.30.0100.00817.09
8.0.20.0110.00817.41
8.0.10.0000.00716.94
8.0.00.0120.00816.96
7.4.330.0000.00516.81
7.4.320.0040.00416.49
7.4.300.0030.00316.61
7.4.290.0000.00716.39
7.4.280.0030.00316.38
7.4.270.0000.00716.52
7.4.260.0030.00313.32
7.4.250.0040.00416.58
7.4.240.0040.00416.54
7.4.230.0080.00016.64
7.4.220.0130.01316.64
7.4.210.0090.00716.61
7.4.200.0030.00316.52
7.4.190.0000.00716.54
7.4.160.0130.00316.62
7.4.150.0120.00817.40
7.4.140.0090.00817.86
7.4.130.0130.00516.55
7.4.120.0150.00916.61
7.4.110.0120.00616.69
7.4.100.0090.01516.52
7.4.90.0040.01416.41
7.4.80.0060.01119.39
7.4.70.0100.00616.59
7.4.60.0070.01316.58
7.4.50.0030.00616.50
7.4.40.0070.00722.77
7.4.30.0090.00616.50
7.4.10.0070.01114.68
7.4.00.0080.01014.90
7.3.330.0030.00313.22
7.3.320.0020.00213.27
7.3.310.0000.00816.43
7.3.300.0000.00716.46
7.3.290.0000.02016.38
7.3.280.0090.00716.44
7.3.270.0090.00917.40
7.3.260.0120.01318.24
7.3.250.0110.00616.46
7.3.240.0070.01116.52
7.3.230.0130.00816.45
7.3.210.0070.01016.31
7.3.200.0030.01819.39
7.3.190.0070.01016.46
7.3.180.0070.01016.40
7.3.170.0120.00916.50
7.3.160.0120.00416.51
7.3.130.0130.00314.88
7.3.120.0050.00914.94
7.3.110.0050.00914.78
7.3.100.0050.01014.55
7.3.90.0070.00514.63
7.3.80.0050.00714.95
7.3.70.0060.00714.82
7.3.60.0090.00514.82
7.3.50.0050.01014.71
7.3.40.0060.00614.83
7.3.30.0050.01014.63
7.3.20.0030.01216.49
7.3.10.0040.01116.54
7.3.00.0030.01016.56
7.2.330.0090.01216.74
7.2.320.0030.01516.84
7.2.310.0090.00916.62
7.2.300.0060.01216.52
7.2.290.0070.01016.77
7.2.260.0040.01314.88
7.2.250.0110.00715.17
7.2.240.0050.01114.89
7.2.230.0050.01015.15
7.2.220.0070.00515.04
7.2.210.0020.01214.96
7.2.200.0080.00614.96
7.2.190.0050.01015.00
7.2.180.0060.00914.89
7.2.170.0080.00814.93
7.2.160.0060.01014.89
7.2.150.0090.00716.86
7.2.140.0060.01016.94
7.2.130.0030.01116.89
7.2.120.0040.00916.72
7.2.110.0050.00916.71
7.2.100.0090.00616.92
7.2.90.0050.00716.89
7.2.80.0070.00516.86
7.2.70.0060.00816.95
7.2.60.0100.01016.79
7.2.50.0030.01117.01
7.2.40.0090.00716.90
7.2.30.0080.00616.81
7.2.20.0070.00816.84
7.2.10.0070.00916.87
7.2.00.0040.01117.48
7.1.330.0020.01315.80
7.1.320.0050.00815.89
7.1.310.0070.00715.88
7.1.300.0060.01015.68
7.1.290.0050.00815.44
7.1.280.0030.01015.76
7.1.270.0050.01015.83
7.1.260.0080.00715.63
7.1.250.0070.00815.65
7.1.240.0080.00715.59
7.1.230.0090.00215.70
7.1.220.0020.01415.78
7.1.210.0040.00415.47
7.1.200.0030.00915.67
7.1.190.0020.01215.65
7.1.180.0010.01115.54
7.1.170.0120.00315.81
7.1.160.0050.00915.64
7.1.150.0050.01015.69
7.1.140.0080.00515.59
7.1.130.0070.00715.77
7.1.120.0030.00915.81
7.1.110.0090.00615.54
7.1.100.0060.00816.43
7.1.90.0030.00715.74
7.1.80.0030.00615.67
7.1.70.0040.00616.29
7.1.60.0060.01216.94
7.1.50.0060.01016.02
7.1.40.0090.00315.55
7.1.30.0070.00615.62
7.1.20.0020.01015.59
7.1.10.0060.00415.61
7.1.00.0040.02317.90
7.0.330.0050.00815.37
7.0.320.0050.00615.27
7.0.310.0030.01015.37
7.0.300.0050.00915.26
7.0.290.0040.00615.24
7.0.280.0030.00915.28
7.0.270.0050.00515.21
7.0.260.0030.00715.49
7.0.250.0060.00715.28
7.0.240.0070.00615.21
7.0.230.0080.00515.24
7.0.220.0070.00615.37
7.0.210.0030.00915.38
7.0.200.0030.00515.86
7.0.190.0030.00915.02
7.0.180.0030.00815.21
7.0.170.0080.00415.29
7.0.160.0050.00615.47
7.0.150.0030.01415.38
7.0.140.0030.03017.57
7.0.130.0010.00715.11
7.0.120.0050.00615.25
7.0.110.0080.00315.36
7.0.100.0020.00715.23
7.0.90.0030.03417.56
7.0.80.0060.01817.27
7.0.70.0040.02817.37
7.0.60.0030.03117.64
7.0.50.0090.01317.69
7.0.40.0090.03215.57
7.0.30.0070.02315.63
7.0.20.0030.03215.60
7.0.10.0070.01515.61
7.0.00.0060.03115.64
5.6.400.0040.00814.30
5.6.390.0000.01014.27
5.6.380.0050.00814.59
5.6.370.0060.00814.10
5.6.360.0050.01014.41
5.6.350.0080.00614.49
5.6.340.0000.01214.20
5.6.330.0080.00414.31
5.6.320.0050.00714.49
5.6.310.0070.00614.48
5.6.300.0090.00614.14
5.6.290.0080.00714.32
5.6.280.0080.02616.51
5.6.270.0020.01314.41
5.6.260.0030.00714.35
5.6.250.0040.00514.35
5.6.240.0070.03116.42
5.6.230.0050.02116.35
5.6.220.0070.03116.26
5.6.210.0060.03116.43
5.6.200.0050.02316.66
5.6.190.0040.02316.59
5.6.180.0050.02916.52
5.6.170.0070.02216.54
5.6.160.0040.02816.63
5.6.150.0040.03416.50
5.6.140.0050.02716.56
5.6.130.0130.03016.65
5.6.120.0080.03016.49
5.6.110.0040.02416.67
5.6.100.0020.02416.57
5.6.90.0050.03716.58
5.6.80.0070.03316.33
5.6.70.0070.02416.37
5.6.60.0040.03316.33
5.6.50.0050.03216.37
5.6.40.0130.02216.33
5.6.30.0060.02116.33
5.6.20.0070.03116.37
5.6.10.0050.03216.24
5.6.00.0060.02716.24
5.5.380.0050.02415.45
5.5.370.0030.03115.31
5.5.360.0060.03415.22
5.5.350.0090.03115.45
5.5.340.0060.01815.43
5.5.330.0070.02415.52
5.5.320.0030.03315.37
5.5.310.0050.02215.53
5.5.300.0020.03215.45
5.5.290.0090.03015.46
5.5.280.0040.03015.63
5.5.270.0020.02315.38
5.5.260.0040.03315.64
5.5.250.0050.02015.33
5.5.240.0060.02015.29
5.5.230.0000.03615.13
5.5.220.0020.03415.25
5.5.210.0060.03115.18
5.5.200.0040.02915.16
5.5.190.0080.02115.22
5.5.180.0030.03715.13
5.5.170.0030.01012.70
5.5.160.0030.01815.35
5.5.150.0070.02815.31
5.5.140.0090.03015.17
5.5.130.0050.01815.26
5.5.120.0070.02915.38
5.5.110.0040.03215.28
5.5.100.0090.03115.21
5.5.90.0050.03015.21
5.5.80.0010.03315.22
5.5.70.0070.02615.27
5.5.60.0090.02815.19
5.5.50.0050.02815.23
5.5.40.0050.02315.24
5.5.30.0070.02815.11
5.5.20.0060.02015.18
5.5.10.0070.03115.11
5.5.00.0060.02115.10
5.4.450.0050.03013.88
5.4.440.0040.03113.79
5.4.430.0040.03413.99
5.4.420.0010.03013.84
5.4.410.0040.02213.76
5.4.400.0040.01713.81
5.4.390.0060.01613.61
5.4.380.0040.02913.77
5.4.370.0030.02813.73
5.4.360.0060.02513.67
5.4.350.0040.02713.61
5.4.340.0020.03113.80
5.4.330.0050.00511.23
5.4.320.0020.02813.76
5.4.310.0080.02513.66
5.4.300.0050.02513.73
5.4.290.0040.02013.70
5.4.280.0060.02513.69
5.4.270.0030.02713.73
5.4.260.0040.02813.70
5.4.250.0030.03113.82
5.4.240.0030.02413.72
5.4.230.0020.01913.80
5.4.220.0070.02913.71
5.4.210.0040.02713.76
5.4.200.0060.01813.73
5.4.190.0040.03013.80
5.4.180.0040.02813.67
5.4.170.0100.02813.72
5.4.160.0020.03013.79
5.4.150.0030.03113.74
5.4.140.0030.02212.84
5.4.130.0060.01712.81
5.4.120.0020.02912.88
5.4.110.0040.03112.88
5.4.100.0030.03012.80
5.4.90.0060.01712.86
5.4.80.0070.01812.86
5.4.70.0030.03112.84
5.4.60.0020.03012.77
5.4.50.0040.02812.75
5.4.40.0030.01512.79
5.4.30.0030.02312.83
5.4.20.0050.01812.79
5.4.10.0040.02612.90
5.4.00.0040.02012.68
5.3.290.0020.03512.08
5.3.280.0060.02812.07
5.3.270.0040.02912.08
5.3.260.0020.03112.12
5.3.250.0030.02112.15
5.3.240.0050.02812.09
5.3.230.0090.02712.08
5.3.220.0030.02112.07
5.3.210.0040.02812.07
5.3.200.0080.02612.05
5.3.190.0080.02512.11
5.3.180.0030.03112.13
5.3.170.0040.02812.13
5.3.160.0020.03012.07
5.3.150.0060.02912.06
5.3.140.0040.02512.05
5.3.130.0050.02612.11
5.3.120.0050.01812.12
5.3.110.0030.03012.05
5.3.100.0030.02811.94
5.3.90.0020.01711.90
5.3.80.0050.02811.85
5.3.70.0030.03011.86
5.3.60.0030.02911.83
5.3.50.0050.02611.89
5.3.40.0050.02711.86
5.3.30.0010.03111.86
5.3.20.0070.02411.76
5.3.10.0030.02811.57
5.3.00.0030.02311.60
5.2.170.0040.02211.15
5.2.160.0070.03211.17
5.2.150.0030.02211.10
5.2.140.0070.02011.09
5.2.130.0030.02011.14
5.2.120.0030.03011.07
5.2.110.0050.02811.06
5.2.100.0000.02811.07
5.2.90.0060.01811.15
5.2.80.0030.03311.06
5.2.70.0000.03611.06
5.2.60.0070.03011.06
5.2.50.0020.03311.03
5.2.40.0050.03011.07
5.2.30.0030.03611.05
5.2.20.0000.03311.08
5.2.10.0030.03211.06
5.2.00.0010.03510.91
5.1.60.0030.01510.63
5.1.50.0010.02810.59
5.1.40.0050.03210.58
5.1.30.0050.03210.77
5.1.20.0020.01910.79
5.1.10.0050.02510.68
5.1.00.0060.02010.57
5.0.50.0020.02510.04
5.0.40.0010.02310.04
5.0.30.0010.02310.04
5.0.20.0020.02310.04
5.0.10.0030.01710.04
5.0.00.0020.01910.04
4.4.90.0020.01910.04
4.4.80.0050.00810.04
4.4.70.0020.02010.04
4.4.60.0050.01210.04
4.4.50.0000.01710.04
4.4.40.0050.01510.04
4.4.30.0030.01710.04
4.4.20.0000.01610.04
4.4.10.0020.01410.04
4.4.00.0000.02210.04
4.3.110.0030.01610.04
4.3.100.0020.01810.04
4.3.90.0000.01610.04
4.3.80.0050.01510.04
4.3.70.0000.01510.04
4.3.60.0020.01510.04
4.3.50.0030.01510.04
4.3.40.0020.02810.04
4.3.30.0030.01810.04
4.3.20.0000.01510.04
4.3.10.0000.01310.04
4.3.00.0020.01710.04

preferences:
55.96 ms | 401 KiB | 5 Q