3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 'Y + 10;'; $arrvalidrules = explode(';', $value); // On vérifie qu'il n'y bien que deux valeurs. if (count($arrvalidrules) == 2) { $intyearend = null; if ($arrvalidrules[0]!='') { if (is_numeric($arrvalidrules[0])) { $intyearstart=intval($arrvalidrules[0]); } else if (strpos($arrvalidrules[0], 'Y') === 0) { $intyearstart = date('Y'); if (($intsignpos = strpos($arrvalidrules[0], '+')) !== false) { echo 'Test:'.substr($arrvalidrules[0], $intsignpos+1); $intyearstart += (int) (trim(substr($arrvalidrules[0], $intsignpos+1))); } else if (($intsignpos = strpos($arrvalidrules[0], '-')) !== false) { $intyearstart -= (int) (trim(substr($arrvalidrules[0], $intsignpos+1))); } } else { $intyearstart = false; } } else { $intyearstart = 0; } } 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.70.0080.00818.56
8.3.60.0070.01416.63
8.3.50.0090.00621.95
8.3.40.0080.00618.92
8.3.30.0120.00619.21
8.3.20.0000.00820.39
8.3.10.0080.00023.70
8.3.00.0000.00920.97
8.2.180.0110.00416.63
8.2.170.0060.00918.91
8.2.160.0030.01622.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.73
8.2.110.0090.00022.15
8.2.100.0080.00317.84
8.2.90.0030.00519.30
8.2.80.0040.00417.97
8.2.70.0000.00917.50
8.2.60.0050.00318.18
8.2.50.0030.00618.07
8.2.40.0040.00421.25
8.2.30.0040.00418.38
8.2.20.0070.00017.82
8.2.10.0000.00718.21
8.2.00.0020.00517.77
8.1.280.0180.00025.92
8.1.270.0040.00423.82
8.1.260.0100.00326.35
8.1.250.0070.00028.09
8.1.240.0040.00421.89
8.1.230.0110.00019.15
8.1.220.0080.00017.76
8.1.210.0030.00618.77
8.1.200.0060.00317.47
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00518.73
8.1.160.0040.00422.03
8.1.150.0050.00218.84
8.1.140.0040.00417.59
8.1.130.0040.00417.82
8.1.120.0040.00417.52
8.1.110.0040.00417.60
8.1.100.0080.00017.66
8.1.90.0000.00717.57
8.1.80.0000.00717.62
8.1.70.0070.00017.52
8.1.60.0030.00517.64
8.1.50.0040.00417.50
8.1.40.0000.00817.57
8.1.30.0080.00017.55
8.1.20.0000.00817.69
8.1.10.0040.00417.53
8.1.00.0000.00717.66
8.0.300.0040.00418.77
8.0.290.0000.00717.28
8.0.280.0070.00018.49
8.0.270.0000.00717.27
8.0.260.0060.00017.27
8.0.250.0070.00017.14
8.0.240.0000.00717.09
8.0.230.0070.00017.13
8.0.220.0080.00016.98
8.0.210.0030.00317.09
8.0.200.0080.00017.00
8.0.190.0030.00617.09
8.0.180.0040.00416.91
8.0.170.0040.00416.90
8.0.160.0040.00416.95
8.0.150.0040.00416.95
8.0.140.0060.00316.86
8.0.130.0050.00013.38
8.0.120.0000.00716.93
8.0.110.0080.00016.97
8.0.100.0000.00716.98
8.0.90.0040.00416.91
8.0.80.0040.01116.91
8.0.70.0040.00417.05
8.0.60.0040.00417.02
8.0.50.0000.00716.88
8.0.30.0090.01117.28
8.0.20.0120.01517.40
8.0.10.0040.00417.16
8.0.00.0070.01116.80
7.4.330.0020.00215.16
7.4.320.0000.00716.70
7.4.300.0000.00616.59
7.4.290.0000.00716.52
7.4.280.0050.00316.67
7.4.270.0000.00816.68
7.4.260.0080.00016.63
7.4.250.0000.00716.64
7.4.240.0000.00716.53
7.4.230.0070.00016.69
7.4.220.0060.01516.78
7.4.210.0120.00516.72
7.4.200.0040.00416.77
7.4.190.0050.00216.62
7.4.160.0090.00616.54
7.4.150.0030.01517.40
7.4.140.0150.00617.86
7.4.130.0090.00916.66
7.4.120.0110.00616.69
7.4.110.0130.01016.47
7.4.100.0150.00916.73
7.4.90.0030.01416.68
7.4.80.0100.00719.39
7.4.70.0130.00316.65
7.4.60.0070.01116.57
7.4.50.0020.00216.62
7.4.40.0110.00616.66
7.4.30.0130.00316.57
7.4.00.0060.00915.26
7.3.330.0030.00313.34
7.3.320.0000.00513.20
7.3.310.0080.00016.42
7.3.300.0040.00416.32
7.3.290.0090.00616.26
7.3.280.0070.01116.34
7.3.270.0120.00617.40
7.3.260.0130.00316.55
7.3.250.0130.00516.56
7.3.240.0070.01016.56
7.3.230.0130.00616.60
7.3.210.0120.00916.45
7.3.200.0100.00619.39
7.3.190.0070.01116.34
7.3.180.0100.00616.45
7.3.170.0090.00616.50
7.3.160.0080.00816.65
7.3.120.0060.01014.75
7.3.110.0040.01114.93
7.3.100.0000.01415.07
7.3.90.0030.00715.18
7.3.80.0090.00615.08
7.3.70.0040.01214.83
7.3.60.0030.00715.10
7.3.50.0040.01014.91
7.3.40.0040.00915.01
7.3.30.0090.00914.71
7.3.20.0100.00016.89
7.3.10.0090.00616.83
7.3.00.0060.01016.87
7.2.330.0090.00916.89
7.2.320.0090.01216.77
7.2.310.0070.01116.90
7.2.300.0100.00716.55
7.2.290.0060.01216.68
7.2.240.0000.01715.37
7.2.230.0030.00614.92
7.2.220.0030.01415.32
7.2.210.0060.00915.13
7.2.200.0040.00815.27
7.2.190.0060.00915.30
7.2.180.0040.01115.29
7.2.170.0140.00415.17
7.2.160.0070.00715.15
7.2.150.0030.01217.17
7.2.140.0090.00917.11
7.2.130.0070.00817.00
7.2.120.0040.01417.17
7.2.110.0060.01017.02
7.2.100.0030.01317.04
7.2.90.0100.00716.83
7.2.80.0060.00917.03
7.2.70.0000.01317.12
7.2.60.0040.01117.06
7.2.50.0030.00716.97
7.2.40.0080.00416.85
7.2.30.0070.00717.18
7.2.20.0030.00617.14
7.2.10.0040.00417.16
7.2.00.0040.01118.22
7.1.330.0090.00615.75
7.1.320.0030.01316.02
7.1.310.0070.00715.95
7.1.300.0060.00615.92
7.1.290.0120.00415.85
7.1.280.0030.01416.08
7.1.270.0070.00715.94
7.1.260.0060.00615.86
7.1.250.0070.00715.93
7.1.200.0030.01415.88
7.1.100.0070.00717.95
7.1.70.0030.00717.45
7.1.60.0100.01319.46
7.1.50.0110.01116.81
7.1.00.0000.08022.54
7.0.200.0000.01116.81
7.0.140.0030.07322.18
7.0.80.0070.08319.96
7.0.70.0100.06719.98
7.0.60.0630.09719.97
7.0.50.0030.06720.42
7.0.40.0100.08320.05
7.0.30.0100.06720.18
7.0.20.0100.08320.07
7.0.10.0030.09020.15
7.0.00.0070.08320.17
5.6.280.0030.07320.87
5.6.230.0000.04720.68
5.6.220.0100.07720.53
5.6.210.0100.06720.75
5.6.200.0100.08720.94
5.6.190.0100.08321.11
5.6.180.0070.08321.18
5.6.170.0170.06720.97
5.6.160.0070.07721.14
5.6.150.0070.08321.14
5.6.140.0030.09021.03
5.6.130.0070.08721.13
5.6.120.0100.08021.08
5.6.110.0130.08021.04
5.6.100.0070.04020.93
5.6.90.0070.08021.15
5.6.80.0070.07320.50
5.6.70.0170.03320.30
5.6.60.0070.04720.39
5.6.50.0070.07720.47
5.6.40.0070.05320.44
5.6.30.0130.07320.38
5.6.20.0070.08020.38
5.6.10.0170.06720.39
5.6.00.0070.08020.39
5.5.370.0030.04720.43
5.5.360.0070.07720.44
5.5.350.0070.08320.32
5.5.340.0100.07720.65
5.5.330.0100.08720.86
5.5.320.0100.08320.80
5.5.310.0100.06720.80
5.5.300.0070.09020.73
5.5.290.0030.05320.79
5.5.280.0070.08020.91
5.5.270.0100.08320.61
5.5.260.0100.07320.73
5.5.250.0100.06320.46
5.5.240.0170.07320.12
5.5.230.0100.04320.31
5.5.220.0070.07320.14
5.5.210.0030.04020.25
5.5.200.0130.08020.25
5.5.190.0070.07020.28
5.5.180.0000.04320.19
5.5.160.0170.07020.24
5.5.150.0200.06720.27
5.5.140.0130.08020.27
5.5.130.0130.07020.22
5.5.120.0070.04319.97
5.5.110.0070.08020.17
5.5.100.0070.07720.18
5.5.90.0100.04020.07
5.5.80.0070.05320.13
5.5.70.0070.08020.09
5.5.60.0130.07020.16
5.5.50.0100.06320.06
5.5.40.0100.04020.03
5.5.30.0100.04320.05
5.5.20.0070.08020.14
5.5.10.0070.08020.06
5.5.00.0100.06020.07
5.4.450.0130.04019.39
5.4.440.0130.07719.45
5.4.430.0070.06019.43
5.4.420.0130.08019.40
5.4.410.0070.08019.43
5.4.400.0030.07018.79
5.4.390.0030.06719.14
5.4.380.0070.07718.98
5.4.370.0070.03319.14
5.4.360.0170.07319.05
5.4.350.0070.04319.14
5.4.340.0100.07019.12
5.4.320.0070.07018.96
5.4.310.0070.05018.95
5.4.300.0070.06019.07
5.4.290.0070.08319.11
5.4.280.0070.06318.96
5.4.270.0130.06319.11
5.4.260.0130.06719.09
5.4.250.0070.04319.05
5.4.240.0130.06319.04
5.4.230.0000.05019.14
5.4.220.0070.04718.80
5.4.210.0070.06019.02
5.4.200.0070.06718.78
5.4.190.0130.07318.96
5.4.180.0100.07319.11
5.4.170.0100.07019.05
5.4.160.0030.05319.10
5.4.150.0030.08318.81
5.4.140.0030.07316.34
5.4.130.0130.06716.33
5.4.120.0130.06316.34
5.4.110.0070.07016.48
5.4.100.0100.07316.48
5.4.90.0070.07716.48
5.4.80.0070.07016.30
5.4.70.0000.08316.24
5.4.60.0170.04016.32
5.4.50.0100.07316.40
5.4.40.0100.07016.33
5.4.30.0170.06316.28
5.4.20.0130.07016.28
5.4.10.0070.04316.30
5.4.00.0030.07315.72
5.3.290.0030.07714.59
5.3.280.0070.07314.62
5.3.270.0030.06314.43
5.3.260.0170.06314.60
5.3.250.0100.07314.58
5.3.240.0100.06714.62
5.3.230.0100.07714.46
5.3.220.0000.08314.56
5.3.210.0070.06314.54
5.3.200.0030.07714.54
5.3.190.0100.07014.55
5.3.180.0070.08014.51
5.3.170.0070.07314.43
5.3.160.0000.07714.56
5.3.150.0030.04014.56
5.3.140.0030.07714.52
5.3.130.0030.05714.48
5.3.120.0130.07014.54
5.3.110.0100.07314.57
5.3.100.0130.04714.01
5.3.90.0030.05013.98
5.3.80.0100.07714.00
5.3.70.0100.07313.80
5.3.60.0070.06713.88
5.3.50.0000.07313.89
5.3.40.0000.04013.73
5.3.30.0070.03713.91
5.3.20.0100.03013.46
5.3.10.0070.02713.67
5.3.00.0070.03013.50
5.2.170.0100.02311.07
5.2.160.0170.01711.22
5.2.150.0030.05711.14
5.2.140.0030.04011.15
5.2.130.0070.03011.07
5.2.120.0000.03010.98
5.2.110.0000.03011.04
5.2.100.0070.02311.04
5.2.90.0000.03010.98
5.2.80.0100.02311.16
5.2.70.0070.02710.98
5.2.60.0000.03010.98
5.2.50.0030.02711.02
5.2.40.0000.03011.05
5.2.30.0030.03311.06
5.2.20.0000.04710.98
5.2.10.0070.02710.98
5.2.00.0030.03310.98
5.1.60.0030.02010.98
5.1.50.0070.03710.98
5.1.40.0000.06010.98
5.1.30.0000.03710.98
5.1.20.0000.02310.98
5.1.10.0000.02710.98
5.1.00.0000.02710.98
5.0.50.0030.01710.98
5.0.40.0030.01710.98
5.0.30.0030.03010.98
5.0.20.0070.02710.98
5.0.10.0030.01710.98
5.0.00.0030.02710.98
4.4.90.0000.01310.98
4.4.80.0000.02310.98
4.4.70.0030.02710.98
4.4.60.0000.01310.98
4.4.50.0000.01710.98
4.4.40.0030.02310.98
4.4.30.0000.01710.98
4.4.20.0000.01710.98
4.4.10.0000.01710.98
4.4.00.0000.02310.98
4.3.110.0030.01310.98
4.3.100.0030.03010.98
4.3.90.0000.02010.98
4.3.80.0100.01710.98
4.3.70.0030.01710.98
4.3.60.0030.01310.98
4.3.50.0000.01710.98
4.3.40.0000.02310.98
4.3.30.0000.01310.98
4.3.20.0000.01710.98
4.3.10.0030.01010.98
4.3.00.0000.02310.98

preferences:
54.82 ms | 401 KiB | 5 Q