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); if ($emember_flag == 1) { // if emember, then 3 months $sumstart_timestamp = $sumend_timestamp - 91; $strsum_startdate = date("Y-m-d", $sumstart_timestamp); } // $sumend_timestamp = $sumend_timestamp + $param_day_multiplier; // add 1 day to cover today $sumend_timestamp = $sumend_timestamp; // covers only until yesterday // die("debug start and end-date: ". $strsum_startdate ." ; ". $strsum_enddate); echo date('r', $strsum_startdate) . ' ' . date('r', $sumend_timestamp);

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.0140.00716.73
8.3.60.0000.01418.68
8.3.50.0260.00322.12
8.3.40.0080.00618.94
8.3.30.0080.00819.22
8.3.20.0030.00520.21
8.3.10.0040.00423.61
8.3.00.0080.00019.26
8.2.180.0070.00716.63
8.2.170.0100.00722.96
8.2.160.0100.00320.57
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.82
8.2.110.0050.00521.10
8.2.100.0060.00618.03
8.2.90.0030.00519.19
8.2.80.0040.00417.97
8.2.70.0080.00018.00
8.2.60.0120.00018.05
8.2.50.0040.00418.34
8.2.40.0090.00022.51
8.2.30.0000.00919.34
8.2.20.0030.00718.07
8.2.10.0040.00418.34
8.2.00.0040.00417.96
8.1.280.0030.01425.92
8.1.270.0040.00423.84
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0150.00620.84
8.1.230.0110.00022.11
8.1.220.0040.00717.77
8.1.210.0000.00818.77
8.1.200.0060.00317.60
8.1.190.0040.00417.47
8.1.180.0060.00318.10
8.1.170.0050.00318.82
8.1.160.0070.00019.06
8.1.150.0080.00020.31
8.1.140.0120.00017.71
8.1.130.0070.00017.89
8.1.120.0070.00017.70
8.1.110.0030.00617.74
8.1.100.0040.00417.63
8.1.90.0040.00417.75
8.1.80.0040.00417.62
8.1.70.0030.00717.73
8.1.60.0060.00617.84
8.1.50.0040.00417.64
8.1.40.0070.00417.70
8.1.30.0090.00017.87
8.1.20.0000.00817.75
8.1.10.0040.00417.79
8.1.00.0000.00817.60
8.0.300.0000.00718.77
8.0.290.0000.00816.88
8.0.280.0030.00318.60
8.0.270.0070.00017.46
8.0.260.0060.00017.33
8.0.250.0030.00317.30
8.0.240.0000.00717.23
8.0.230.0040.00417.17
8.0.220.0030.00317.20
8.0.210.0040.00417.19
8.0.200.0030.00317.27
8.0.190.0030.00617.34
8.0.180.0070.00017.32
8.0.170.0050.00317.35
8.0.160.0090.00017.20
8.0.150.0040.00417.07
8.0.140.0000.00717.19
8.0.130.0000.00513.64
8.0.120.0080.00017.14
8.0.110.0030.00517.23
8.0.100.0050.00317.26
8.0.90.0000.00817.30
8.0.80.0070.00717.30
8.0.70.0040.00417.29
8.0.60.0030.00617.09
8.0.50.0000.00817.26
8.0.30.0100.01017.54
8.0.20.0050.01417.50
8.0.10.0080.00017.14
8.0.00.0080.00916.90
7.4.330.0000.00515.00
7.4.320.0000.00616.74
7.4.300.0060.00016.67
7.4.290.0000.00716.70
7.4.280.0060.00316.82
7.4.270.0040.00416.73
7.4.260.0030.00316.79
7.4.250.0040.00416.69
7.4.240.0040.00316.85
7.4.230.0070.00016.82
7.4.220.0120.01716.67
7.4.210.0030.01016.75
7.4.200.0000.00716.89
7.4.190.0050.00216.88
7.4.160.0070.01016.75
7.4.150.0120.00917.40
7.4.140.0150.00317.86
7.4.130.0100.00716.75
7.4.120.0090.00816.99
7.4.110.0100.01316.88
7.4.100.0160.00316.61
7.4.90.0140.00316.75
7.4.80.0070.01019.39
7.4.70.0060.00916.82
7.4.60.0120.00616.68
7.4.50.0000.00416.85
7.4.40.0100.00616.75
7.4.30.0100.00716.67
7.4.00.0060.00914.97
7.3.330.0000.00613.34
7.3.320.0000.00513.52
7.3.310.0000.00716.58
7.3.300.0000.00716.49
7.3.290.0030.01016.62
7.3.280.0070.01116.63
7.3.270.0080.01217.40
7.3.260.0120.01216.84
7.3.250.0150.00516.67
7.3.240.0090.00916.81
7.3.230.0160.00616.84
7.3.210.0110.01116.58
7.3.200.0130.00319.39
7.3.190.0110.00716.67
7.3.180.0060.00916.66
7.3.170.0060.01216.64
7.3.160.0110.00616.85
7.3.120.0030.01015.27
7.2.330.0090.01216.94
7.2.320.0090.00916.75
7.2.310.0130.00916.80
7.2.300.0060.00917.08
7.2.290.0120.00616.89
7.2.60.0090.00617.36
7.1.200.0000.01115.94
7.1.100.0030.01318.56
7.1.70.0040.00417.34
7.1.60.0030.01119.70
7.1.50.0070.01417.05
7.1.00.0030.07322.28
7.0.200.0030.01016.52
7.0.140.0000.07322.09
7.0.110.0000.09020.01
7.0.100.0100.07719.98
7.0.90.0130.08019.94
7.0.80.0100.08320.05
7.0.70.0100.08019.95
7.0.60.0200.07319.91
7.0.50.0100.08320.05
7.0.40.0070.08719.80
7.0.30.0100.07719.78
7.0.20.0170.07319.72
7.0.10.0000.08319.75
7.0.00.0100.06719.74
5.6.280.0000.07721.03
5.6.260.0130.06020.70
5.6.250.0030.08320.61
5.6.240.0100.08720.64
5.6.230.0200.07020.70
5.6.220.0130.07720.55
5.6.210.0100.08720.40
5.6.200.0030.09020.66
5.6.190.0000.05720.59
5.6.180.0000.09020.70
5.6.170.0100.07720.64
5.6.160.0130.04320.71
5.6.150.0030.08720.63
5.6.140.0070.08020.56
5.6.130.0100.04320.65
5.6.120.0030.06020.70
5.6.110.0230.07020.55
5.6.100.0100.08020.63
5.6.90.0070.08020.63
5.6.80.0070.07320.04
5.6.70.0130.07019.84
5.6.60.0030.07320.02
5.6.50.0130.07320.03
5.6.40.0170.06320.06
5.6.30.0170.06719.99
5.6.20.0030.04020.02
5.6.10.0100.07320.06
5.6.00.0170.07319.92
5.5.380.0070.08317.63
5.5.370.0130.07017.50
5.5.360.0070.08717.63
5.5.350.0070.08017.61
5.5.340.0070.06717.86
5.5.330.0100.07017.85
5.5.320.0070.08317.87
5.5.310.0130.07318.09
5.5.300.0130.07018.12
5.5.290.0070.08318.16
5.5.280.0100.07718.15
5.5.270.0030.05318.14
5.5.260.0070.07017.84
5.5.250.0030.09017.82
5.5.240.0030.05717.23
5.5.230.0070.08017.24
5.5.220.0070.07717.53
5.5.210.0030.08017.24
5.5.200.0030.08317.52
5.5.190.0070.07717.47
5.5.180.0100.06317.45
5.5.160.0030.08017.52
5.5.150.0070.07317.21
5.5.140.0100.07717.44
5.5.130.0030.07017.33
5.5.120.0030.08717.37
5.5.110.0030.07717.47
5.5.100.0070.07717.36
5.5.90.0070.07317.34
5.5.80.0070.07317.02
5.5.70.0070.06717.13
5.5.60.0030.08317.49
5.5.50.0100.07317.13
5.5.40.0170.06317.23
5.5.30.0070.07317.08
5.5.20.0030.05317.49
5.5.10.0100.07317.36
5.5.00.0070.07017.39
5.4.450.0100.08019.42
5.4.440.0070.06719.48
5.4.430.0170.07019.25
5.4.420.0030.05319.59
5.4.410.0100.07719.16
5.4.400.0130.07719.01
5.4.390.0070.07018.98
5.4.380.0000.08019.17
5.4.370.0070.06318.93
5.4.360.0100.06719.03
5.4.350.0100.06319.12
5.4.340.0070.05719.07
5.4.320.0030.08018.98
5.4.310.0100.07719.03
5.4.300.0130.07319.18
5.4.290.0030.07719.02
5.4.280.0130.07319.07
5.4.270.0030.08019.03
5.4.260.0030.08319.09
5.4.250.0070.08019.02
5.4.240.0100.07319.27
5.4.230.0100.07019.17
5.4.220.0100.07319.27
5.4.210.0070.08019.11
5.4.200.0130.07019.26
5.4.190.0100.07019.00
5.4.180.0100.07319.23
5.4.170.0030.05718.95
5.4.160.0130.07019.01
5.4.150.0170.07019.11
5.4.140.0070.06016.27
5.4.130.0030.07316.51
5.4.120.0070.07016.51
5.4.110.0100.06316.55
5.4.100.0100.07016.34
5.4.90.0030.07716.33
5.4.80.0100.07016.41
5.4.70.0130.06316.56
5.4.60.0030.06316.11
5.4.50.0030.07316.46
5.4.40.0100.07316.52
5.4.30.0070.07716.45
5.4.20.0000.06316.10
5.4.10.0070.07016.11
5.4.00.0100.07715.89
5.3.290.0100.05714.69
5.3.280.0070.07714.69
5.3.270.0030.08314.63
5.3.260.0070.05014.71
5.3.250.0070.05314.52
5.3.240.0000.08014.56
5.3.230.0000.04714.49
5.3.220.0030.05014.44
5.3.210.0100.07314.47
5.3.200.0000.07714.46
5.3.190.0100.06314.62
5.3.180.0070.07314.59
5.3.170.0030.08014.64
5.3.160.0070.07014.52
5.3.150.0100.06014.44
5.3.140.0070.07314.41
5.3.130.0070.07314.58
5.3.120.0230.06014.56
5.3.110.0100.07014.43
5.3.100.0070.07014.03
5.3.90.0030.06013.91
5.3.80.0030.07013.96
5.3.70.0070.07313.89
5.3.60.0100.07014.02
5.3.50.0070.06013.84
5.3.40.0100.07313.85
5.3.30.0100.07313.71
5.3.20.0130.06713.64
5.3.10.0100.07313.73
5.3.00.0070.07013.66
5.2.170.0030.06011.09
5.2.160.0130.05711.17
5.2.150.0070.06011.31
5.2.140.0130.05311.16
5.2.130.0100.06011.18
5.2.120.0070.06011.06
5.2.110.0030.06311.17
5.2.100.0070.06011.05
5.2.90.0030.03711.05
5.2.80.0070.06311.12
5.2.70.0030.06311.18
5.2.60.0000.06711.01
5.2.50.0030.06710.98
5.2.40.0070.06010.94
5.2.30.0070.05711.00
5.2.20.0030.05710.86
5.2.10.0100.05710.88
5.2.00.0070.06010.72
5.1.60.0030.05310.08
5.1.50.0000.05310.08
5.1.40.0030.0509.95
5.1.30.0000.06010.36
5.1.20.0030.06010.34
5.1.10.0070.03310.23
5.1.00.0030.06010.07
5.0.50.0000.0439.75
5.0.40.0030.0279.75
5.0.30.0070.0409.75
5.0.20.0070.0409.75
5.0.10.0000.0209.75
5.0.00.0030.0679.75
4.4.90.0000.0379.75
4.4.80.0030.0309.75
4.4.70.0030.0309.75
4.4.60.0070.0309.75
4.4.50.0000.0379.75
4.4.40.0000.0579.75
4.4.30.0000.0279.75
4.4.20.0030.0309.75
4.4.10.0000.0409.75
4.4.00.0000.0439.75
4.3.110.0000.0409.75
4.3.100.0030.0339.75
4.3.90.0070.0309.75
4.3.80.0000.0639.75
4.3.70.0070.0139.75
4.3.60.0030.0309.75
4.3.50.0030.0239.75
4.3.40.0030.0479.75
4.3.30.0000.0339.75
4.3.20.0000.0309.75
4.3.10.0030.0179.75
4.3.00.0030.0339.75

preferences:
79.21 ms | 401 KiB | 5 Q