3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Asia/Singapore'); $strsum_enddate = date("Y-m-d"); $sumend_timestamp = strtotime($strsum_enddate); $tempstart_timestamp = strtotime("-1 day"); $strtemp_date = date("Y-m-d", $tempstart_timestamp); // $artemp = explode("-", $strsum_enddate); $artemp = explode("-", $strtemp_date); $startyear = intval($artemp[0]) - 1; // derive start-date from end-date $startmonth = $artemp[1]; if (substr($startmonth, 0, 1) == "0") { $startmonth = substr($startmonth, 1); } $startmonth = intval($startmonth); $startday = $artemp[2]; if (substr($startday, 0, 1) == "0") { $startday = substr($startday, 1); } $startday = intval($startday); if ($startmonth == 2 && $startday == 29) { // if feb 29, set to feb 28, 2 years is not a leap year if ($emember_flag == 0) { // if not emember, go back 1 year $startday = 28; } } $strsum_startdate = $startyear ."-". $startmonth ."-". $startday; $sumstart_timestamp = strtotime($strsum_startdate); echo date('Y-m-d', $sumstart_timestamp) . "\n"; echo date('Y-m-d', $sumend_timestamp) . "\n";

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.0130.00616.75
8.3.50.0070.00922.06
8.3.40.0060.00919.01
8.3.30.0070.00719.04
8.3.20.0050.00220.21
8.3.10.0030.00623.67
8.3.00.0040.00419.14
8.2.180.0030.01217.00
8.2.170.0120.00322.96
8.2.160.0100.00320.53
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0080.00020.91
8.2.110.0040.00422.33
8.2.100.0060.00617.79
8.2.90.0080.00019.36
8.2.80.0060.00317.97
8.2.70.0040.00417.75
8.2.60.0050.00517.93
8.2.50.0050.00318.07
8.2.40.0040.00420.20
8.2.30.0040.00418.33
8.2.20.0000.00717.92
8.2.10.0040.00418.30
8.2.00.0000.00718.02
8.1.280.0110.00625.92
8.1.270.0080.00024.14
8.1.260.0030.00626.35
8.1.250.0000.00728.09
8.1.240.0060.00323.95
8.1.230.0000.01019.22
8.1.220.0030.00517.91
8.1.210.0040.00418.77
8.1.200.0040.00717.50
8.1.190.0000.00917.47
8.1.180.0060.00318.10
8.1.170.0060.00418.82
8.1.160.0050.00222.09
8.1.150.0100.00018.82
8.1.140.0020.00517.59
8.1.130.0000.00717.88
8.1.120.0000.00817.63
8.1.110.0040.00417.81
8.1.100.0070.00017.67
8.1.90.0040.00417.72
8.1.80.0030.00517.61
8.1.70.0000.00717.57
8.1.60.0030.00517.76
8.1.50.0040.00417.64
8.1.40.0020.00517.61
8.1.30.0050.00317.82
8.1.20.0070.00017.77
8.1.10.0000.00717.80
8.1.00.0040.00417.54
8.0.300.0000.00818.77
8.0.290.0040.00417.30
8.0.280.0050.00318.62
8.0.270.0030.00317.46
8.0.260.0000.00617.47
8.0.250.0030.00317.26
8.0.240.0080.00017.22
8.0.230.0000.00717.15
8.0.220.0030.00317.05
8.0.210.0030.00317.05
8.0.200.0030.00317.17
8.0.190.0030.00317.21
8.0.180.0040.00417.07
8.0.170.0000.00917.02
8.0.160.0030.00317.18
8.0.150.0000.00717.17
8.0.140.0050.00517.16
8.0.130.0030.00313.55
8.0.120.0050.00317.14
8.0.110.0020.00517.18
8.0.100.0040.00417.11
8.0.90.0040.00416.98
8.0.80.0000.01517.09
8.0.70.0000.00717.20
8.0.60.0040.00417.04
8.0.50.0000.00717.04
8.0.30.0050.01317.19
8.0.20.0080.01017.40
8.0.10.0000.00717.07
8.0.00.0060.01117.23
7.4.330.0000.00515.27
7.4.320.0000.00716.75
7.4.300.0000.00716.70
7.4.290.0000.00716.66
7.4.280.0040.00416.80
7.4.270.0030.00316.71
7.4.260.0030.00316.61
7.4.250.0000.00716.73
7.4.240.0020.00516.72
7.4.230.0040.00416.79
7.4.220.0070.01916.75
7.4.210.0050.01116.74
7.4.200.0000.00716.78
7.4.190.0030.00316.76
7.4.160.0170.00016.85
7.4.150.0100.01017.40
7.4.140.0070.01117.86
7.4.130.0130.00516.82
7.4.120.0110.00616.76
7.4.110.0130.00916.82
7.4.100.0060.01016.78
7.4.90.0100.00716.61
7.4.80.0130.00719.39
7.4.70.0100.01016.77
7.4.60.0080.00816.48
7.4.50.0090.00016.66
7.4.40.0050.01316.81
7.4.30.0070.01016.67
7.4.00.0050.00915.11
7.3.330.0000.00513.47
7.3.320.0000.00613.32
7.3.310.0070.00016.66
7.3.300.0070.00016.52
7.3.290.0100.00616.58
7.3.280.0070.00916.46
7.3.270.0110.00617.40
7.3.260.0110.00716.38
7.3.250.0120.00616.66
7.3.240.0150.00416.79
7.3.230.0030.01416.48
7.3.210.0130.00416.67
7.3.200.0130.00319.39
7.3.190.0130.00716.58
7.3.180.0140.00316.62
7.3.170.0040.01216.57
7.3.160.0000.01716.86
7.3.120.0100.00514.94
7.3.110.0030.01415.00
7.3.100.0030.01015.04
7.3.90.0110.00715.05
7.3.80.0100.00715.25
7.3.70.0070.00715.21
7.3.60.0100.00614.89
7.3.50.0110.00414.92
7.3.40.0070.01014.88
7.3.30.0100.00315.21
7.3.20.0140.00316.89
7.3.10.0040.01216.91
7.3.00.0070.00716.65
7.2.330.0090.00916.62
7.2.320.0160.00617.00
7.2.310.0130.00316.97
7.2.300.0070.01017.07
7.2.290.0120.00617.09
7.2.250.0060.00515.57
7.2.240.0070.01115.62
7.2.230.0110.00815.00
7.2.220.0030.01415.61
7.2.210.0060.01215.31
7.2.200.0030.00914.98
7.2.190.0030.01415.41
7.2.180.0060.01015.13
7.2.170.0070.01114.95
7.2.00.0040.00819.68
7.1.330.0070.00715.78
7.1.320.0060.00916.05
7.1.310.0040.01115.89
7.1.300.0000.01316.04
7.1.290.0000.01416.08
7.1.280.0060.00316.14
7.1.270.0090.00016.19
7.1.260.0040.00816.13
7.1.200.0060.01015.91
7.1.100.0040.00718.57
7.1.70.0060.01017.32
7.1.60.0180.00719.46
7.1.50.0050.01417.00
7.1.00.0070.07322.44
7.0.200.0000.00716.82
7.0.140.0000.07722.09
7.0.80.0030.04720.06
7.0.70.0100.05020.05
7.0.60.0070.04319.98
7.0.50.0270.04020.30
7.0.40.0030.04020.07
7.0.30.0100.04019.96
7.0.20.0000.04720.09
7.0.10.0030.04020.07
7.0.00.0070.04020.09
5.6.280.0030.07321.11
5.6.230.0030.04320.66
5.6.220.0070.04320.50
5.6.210.0070.04320.77
5.6.200.0100.04020.94
5.6.190.0000.04721.14
5.6.180.0000.04321.04
5.6.170.0100.03720.96
5.6.160.0000.04721.17
5.6.150.0130.03321.01
5.6.140.0030.04320.99
5.6.130.0030.04321.07
5.6.120.0030.03721.06
5.6.110.0030.04721.04
5.6.100.0030.03320.97
5.6.90.0070.05321.00
5.6.80.0130.03320.47
5.6.70.0130.05320.36
5.6.60.0070.07720.43
5.6.50.0100.07720.32
5.6.40.0000.05020.43
5.6.30.0000.08020.44
5.6.20.0070.07320.37
5.6.10.0070.04020.41
5.6.00.0000.04720.36
5.5.370.0000.03720.57
5.5.360.0130.03320.41
5.5.350.0100.04020.43
5.5.340.0030.04320.91
5.5.330.0030.04020.84
5.5.320.0100.06020.92
5.5.310.0030.04020.80
5.5.300.0070.03720.77
5.5.290.0070.04020.79
5.5.280.0000.04720.81
5.5.270.0100.03020.84
5.5.260.0030.03320.78
5.5.250.0070.08320.70
5.5.240.0170.06020.25
5.5.230.0000.05020.18
5.5.220.0030.08020.09
5.5.210.0030.07320.25
5.5.200.0030.07720.26
5.5.190.0070.06320.18
5.5.180.0070.03320.16
5.5.160.0070.08020.27
5.5.150.0030.06320.29
5.5.140.0100.06320.27
5.5.130.0100.06320.11
5.5.120.0030.04320.21
5.5.110.0030.08020.20
5.5.100.0070.07320.06
5.5.90.0130.07320.18
5.5.80.0030.08020.08
5.5.70.0070.07320.04
5.5.60.0100.07320.06
5.5.50.0000.05320.02
5.5.40.0170.06320.08
5.5.30.0030.05020.11
5.5.20.0030.04720.05
5.5.10.0130.05720.02
5.5.00.0030.05020.11
5.4.450.0000.04319.27
5.4.440.0070.03719.30
5.4.430.0030.04019.30
5.4.420.0100.02719.36
5.4.410.0070.07019.25
5.4.400.0030.03719.04
5.4.390.0130.06019.05
5.4.380.0100.05318.81
5.4.370.0100.06319.06
5.4.360.0130.06719.13
5.4.350.0070.04019.12
5.4.340.0030.08019.13
5.4.320.0130.07719.16
5.4.310.0100.07319.06
5.4.300.0030.08019.12
5.4.290.0070.06019.05
5.4.280.0130.07718.78
5.4.270.0030.06719.04
5.4.260.0030.04018.94
5.4.250.0030.05019.02
5.4.240.0130.06318.96
5.4.230.0070.04318.97
5.4.220.0100.04318.96
5.4.210.0070.05319.02
5.4.200.0070.07319.02
5.4.190.0030.07718.94
5.4.180.0130.05719.04
5.4.170.0070.06719.04
5.4.160.0100.06719.02
5.4.150.0030.05018.98
5.4.140.0100.07016.45
5.4.130.0070.03316.43
5.4.120.0100.05316.41
5.4.110.0030.05016.31
5.4.100.0030.07716.37
5.4.90.0030.05716.38
5.4.80.0030.06316.47
5.4.70.0070.03016.39
5.4.60.0030.03316.39
5.4.50.0030.06016.27
5.4.40.0130.06316.43
5.4.30.0030.04016.34
5.4.20.0100.05716.18
5.4.10.0100.05316.23
5.4.00.0070.06315.82
5.3.290.0030.08014.52
5.3.280.0030.07014.45
5.3.270.0000.04314.61
5.3.260.0070.07314.44
5.3.250.0030.07714.58
5.3.240.0030.05314.46
5.3.230.0100.03714.52
5.3.220.0070.04314.57
5.3.210.0100.07014.44
5.3.200.0070.06714.59
5.3.190.0030.03314.55
5.3.180.0030.03714.51
5.3.170.0000.05314.41
5.3.160.0000.06314.43
5.3.150.0070.06714.43
5.3.140.0070.07314.56
5.3.130.0070.04714.43
5.3.120.0100.03014.43
5.3.110.0070.04014.50
5.3.100.0070.03013.91
5.3.90.0070.04313.96
5.3.80.0000.08314.04
5.3.70.0030.03313.98
5.3.60.0100.07713.95
5.3.50.0070.07713.75
5.3.40.0070.06713.93
5.3.30.0070.03013.93
5.3.20.0000.03713.70
5.3.10.0100.02713.62
5.3.00.0000.07713.59
5.2.170.0130.04711.20
5.2.160.0100.05011.02
5.2.150.0000.04011.20
5.2.140.0000.03311.01
5.2.130.0030.04710.98
5.2.120.0030.03011.15
5.2.110.0100.03011.10
5.2.100.0070.02310.93
5.2.90.0030.06011.04
5.2.80.0100.03011.15
5.2.70.0030.03011.13
5.2.60.0070.06011.10
5.2.50.0030.05710.89
5.2.40.0000.05311.05
5.2.30.0000.05010.98
5.2.20.0030.05010.83
5.2.10.0000.02710.98
5.2.00.0070.04010.79
5.1.60.0000.02710.03
5.1.50.0030.04710.08
5.1.40.0000.04310.07
5.1.30.0070.02010.36
5.1.20.0030.05010.42
5.1.10.0030.02310.08
5.1.00.0100.0439.91
5.0.50.0030.0438.56
5.0.40.0000.0238.52
5.0.30.0070.0408.30
5.0.20.0070.0408.21
5.0.10.0000.0308.02
5.0.00.0000.0378.20
4.4.90.0030.0207.46
4.4.80.0030.0277.46
4.4.70.0030.0277.46
4.4.60.0000.0207.46
4.4.50.0070.0177.46
4.4.40.0000.0277.46
4.4.30.0000.0237.46
4.4.20.0000.0377.46
4.4.10.0030.0307.46
4.4.00.0000.0337.46
4.3.110.0070.0277.46
4.3.100.0000.0337.46
4.3.90.0070.0337.46
4.3.80.0000.0407.46
4.3.70.0070.0307.46
4.3.60.0030.0337.46
4.3.50.0000.0307.46
4.3.40.0070.0277.46
4.3.30.0030.0337.46
4.3.20.0000.0277.46
4.3.10.0000.0237.46
4.3.00.0030.0177.46

preferences:
40 ms | 401 KiB | 5 Q