3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Asia/Singapore'); $offset = strtotime('2014-07-01'); $strsum_enddate = date("Y-m-d", $offset); $sumend_timestamp = strtotime($strsum_enddate); $tempstart_timestamp = strtotime("-1 day", $offset); $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('r', $sumstart_timestamp) . "\n"; echo date('r', $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.0070.01116.50
8.3.50.0070.00718.31
8.3.40.0040.01118.95
8.3.30.0110.00419.21
8.3.20.0050.00220.34
8.3.10.0060.00323.42
8.3.00.0040.00419.18
8.2.180.0130.00716.75
8.2.170.0150.00022.96
8.2.160.0140.00020.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00020.79
8.2.110.0070.01020.30
8.2.100.0090.00318.03
8.2.90.0000.00819.31
8.2.80.0000.00917.97
8.2.70.0050.00317.75
8.2.60.0060.00318.15
8.2.50.0030.00618.07
8.2.40.0060.00320.07
8.2.30.0000.00718.36
8.2.20.0050.00317.91
8.2.10.0070.00018.20
8.2.00.0030.00518.06
8.1.270.0000.00823.92
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0100.00023.89
8.1.230.0080.00321.06
8.1.220.0060.00317.77
8.1.210.0000.00818.77
8.1.200.0080.00517.60
8.1.190.0000.00817.48
8.1.180.0090.00318.10
8.1.170.0000.00818.71
8.1.160.0050.00322.08
8.1.150.0000.01018.93
8.1.140.0070.00017.70
8.1.130.0000.00717.97
8.1.120.0000.00717.63
8.1.110.0030.00517.71
8.1.100.0000.00717.59
8.1.90.0020.00517.73
8.1.80.0070.00017.70
8.1.70.0030.00317.70
8.1.60.0080.00017.83
8.1.50.0040.00417.64
8.1.40.0040.00417.71
8.1.30.0030.00517.83
8.1.20.0080.00017.75
8.1.10.0050.00317.74
8.1.00.0040.00417.71
8.0.300.0070.00018.77
8.0.290.0040.00417.41
8.0.280.0000.00718.50
8.0.270.0030.00317.34
8.0.260.0000.00617.33
8.0.250.0000.00717.23
8.0.240.0030.00617.20
8.0.230.0030.00317.06
8.0.220.0000.00717.18
8.0.210.0030.00317.16
8.0.200.0030.00317.13
8.0.190.0000.00717.24
8.0.180.0000.00717.23
8.0.170.0030.00617.08
8.0.160.0030.00417.16
8.0.150.0040.00417.11
8.0.140.0070.00017.15
8.0.130.0030.00313.57
8.0.120.0040.00417.13
8.0.110.0040.00417.18
8.0.100.0080.00017.00
8.0.90.0000.00717.15
8.0.80.0100.00717.07
8.0.70.0020.00517.04
8.0.60.0040.00417.18
8.0.50.0050.00217.20
8.0.30.0150.00617.44
8.0.20.0120.00617.40
8.0.10.0000.00717.29
8.0.00.0110.00717.08
7.4.330.0030.00315.17
7.4.320.0060.00016.67
7.4.300.0000.00716.63
7.4.290.0040.00416.78
7.4.280.0050.00216.70
7.4.270.0000.00716.62
7.4.260.0030.00616.65
7.4.250.0040.00416.64
7.4.240.0030.00316.74
7.4.230.0070.00016.88
7.4.220.0090.01216.83
7.4.210.0090.00916.79
7.4.200.0040.00416.61
7.4.190.0040.00416.97
7.4.160.0040.01216.65
7.4.150.0170.00017.40
7.4.140.0080.01017.86
7.4.130.0080.00916.73
7.4.120.0070.01016.68
7.4.110.0070.01416.75
7.4.100.0060.01016.75
7.4.90.0130.00616.70
7.4.80.0110.01119.39
7.4.70.0080.00816.69
7.4.60.0100.01016.59
7.4.50.0040.00416.88
7.4.40.0130.00316.59
7.4.30.0150.00716.88
7.4.00.0030.01315.34
7.3.330.0030.00313.38
7.3.320.0030.00313.40
7.3.310.0000.00716.63
7.3.300.0040.00416.58
7.3.290.0030.01216.41
7.3.280.0130.00516.47
7.3.270.0090.00917.40
7.3.260.0120.00616.73
7.3.250.0100.00616.59
7.3.240.0130.00316.82
7.3.230.0160.00616.71
7.3.210.0140.00416.80
7.3.200.0070.01019.39
7.3.190.0080.00816.77
7.3.180.0060.01416.59
7.3.170.0110.00616.61
7.3.160.0090.00616.66
7.3.120.0140.00015.28
7.3.10.0080.01216.84
7.3.00.0110.00616.82
7.2.330.0100.01017.06
7.2.320.0100.01316.68
7.2.310.0090.00917.07
7.2.300.0040.02016.68
7.2.290.0000.01717.02
7.2.130.0070.00817.03
7.2.120.0070.00717.04
7.2.110.0080.00816.96
7.2.100.0120.00517.04
7.2.90.0140.00716.93
7.2.80.0100.01017.22
7.2.70.0080.01017.05
7.2.60.0050.01217.14
7.2.50.0360.00716.96
7.2.40.0050.01416.84
7.2.30.0100.00817.13
7.2.20.0110.00616.84
7.2.10.0110.00616.93
7.2.00.0100.00717.01
7.1.250.0140.00216.07
7.1.240.0040.01215.98
7.1.230.0120.00516.01
7.1.220.0140.00215.86
7.1.210.0080.00816.10
7.1.200.0080.00715.76
7.1.190.0060.01015.81
7.1.180.0100.00915.81
7.1.170.0100.00915.78
7.1.160.0080.00615.82
7.1.150.0090.00715.89
7.1.140.0100.00516.00
7.1.130.0080.00816.02
7.1.120.0130.00516.01
7.1.110.0120.00515.97
7.1.100.0070.00816.06
7.1.90.0080.00916.03
7.1.80.0150.00715.81
7.1.70.0080.00616.42
7.1.60.0070.00816.34
7.1.50.0060.01016.43
7.1.40.0110.00516.00
7.1.30.0080.00715.92
7.1.20.0120.00715.87
7.1.10.0070.00915.67
7.1.00.0120.02518.08
7.0.330.0120.01115.40
7.0.320.0110.00115.47
7.0.310.0360.00915.46
7.0.300.0080.00915.48
7.0.290.0050.01015.13
7.0.280.0080.00615.30
7.0.270.0090.00515.31
7.0.260.0120.00515.52
7.0.250.0130.00215.48
7.0.240.0120.00415.35
7.0.230.0090.00615.28
7.0.220.0080.00915.36
7.0.210.0150.00315.30
7.0.200.0100.00615.83
7.0.190.0070.01115.20
7.0.180.0070.00715.48
7.0.170.0060.00415.34
7.0.160.0070.01215.33
7.0.150.0070.00815.38
7.0.140.0100.02717.73
7.0.130.0120.00315.38
7.0.120.0150.00215.31
7.0.110.0100.00615.38
7.0.100.0040.01015.52
7.0.90.0110.00715.30
7.0.80.0070.03316.83
7.0.70.0070.03116.99
7.0.60.0110.01916.90
7.0.50.0120.02817.07
7.0.40.0030.02415.73
7.0.30.0100.02815.62
7.0.20.0050.03215.56
7.0.10.0070.03515.54
7.0.00.0070.03415.53
5.6.380.0030.01014.69
5.6.370.0080.00814.49
5.6.360.0090.00714.22
5.6.350.0050.00914.36
5.6.340.0090.00614.47
5.6.330.0090.00914.73
5.6.320.0090.00514.35
5.6.310.0050.01414.35
5.6.300.0060.01114.37
5.6.290.0080.01014.55
5.6.280.0060.03116.59
5.6.270.0070.00714.57
5.6.260.0080.01014.11
5.6.250.0060.01014.62
5.6.240.0090.00414.35
5.6.230.0100.03016.44
5.6.220.0090.03016.51
5.6.210.0070.01816.38
5.6.200.0060.03216.58
5.6.190.0070.03416.54
5.6.180.0130.02416.50
5.6.170.0120.02616.59
5.6.160.0080.03416.58
5.6.150.0060.03616.57
5.6.140.0110.03316.67
5.6.130.0120.03016.59
5.6.120.0070.02516.36
5.6.110.0080.03516.48
5.6.100.0080.02816.57
5.6.90.0140.01716.50
5.6.80.0110.02916.30
5.6.70.0130.02916.21
5.6.60.0150.02916.29
5.6.50.0120.02216.44
5.6.40.0110.03416.40
5.6.30.0150.03316.35
5.6.20.0130.02816.41
5.6.10.0220.03116.34
5.6.00.0130.02716.42
5.5.380.0090.00411.01
5.5.370.0030.03313.98
5.5.360.0040.03414.23
5.5.350.0070.03114.34
5.5.340.0050.02714.57
5.5.330.0060.03014.43
5.5.320.0090.02814.37
5.5.310.0060.02914.55
5.5.300.0080.02814.38
5.5.290.0080.03114.47
5.5.280.0090.01814.33
5.5.270.0060.02614.50
5.5.260.0030.02614.38
5.5.250.0030.02214.43
5.5.240.0060.02514.13
5.5.230.0060.03014.15
5.5.220.0080.03014.15
5.5.210.0110.02114.09
5.5.200.0050.02114.00
5.5.190.0070.03214.15
5.5.180.0090.02814.19
5.5.170.0070.00411.10
5.5.160.0110.02814.11
5.5.150.0060.02814.15
5.5.140.0100.03114.29
5.5.130.0090.02313.97
5.5.120.0050.03314.25
5.5.110.0090.03014.17
5.5.100.0060.02914.18
5.5.90.0050.03214.23
5.5.80.0110.02114.02
5.5.70.0080.01614.14
5.5.60.0100.02114.18
5.5.50.0140.03114.02
5.5.40.0130.02013.94
5.5.30.0120.01814.01
5.5.20.0100.02913.99
5.5.10.0110.02914.02
5.5.00.0130.02813.89
5.4.450.0050.03013.78
5.4.440.0090.02813.68
5.4.430.0030.02913.62
5.4.420.0090.02813.70
5.4.410.0130.02513.85
5.4.400.0060.03213.65
5.4.390.0090.02713.61
5.4.380.0120.02813.65
5.4.370.0150.02313.62
5.4.360.0120.01713.56
5.4.350.0170.02513.50
5.4.340.0170.02813.65
5.4.330.0130.00510.86
5.4.320.0180.02413.48
5.4.310.0040.02113.71
5.4.300.0180.02013.72
5.4.290.0130.02813.70
5.4.280.0130.02213.65
5.4.270.0110.02913.52
5.4.260.0100.03013.63
5.4.250.0080.03013.50
5.4.240.0120.02113.60
5.4.230.0140.01913.62
5.4.220.0090.03013.62
5.4.210.0130.03013.62
5.4.200.0130.02913.80
5.4.190.0120.02113.52
5.4.180.0090.02613.75
5.4.170.0110.01813.65
5.4.160.0050.03113.80
5.4.150.0080.02013.72
5.4.140.0120.02612.91
5.4.130.0100.02012.82
5.4.120.0060.03012.78
5.4.110.0050.02912.91
5.4.100.0040.03212.87
5.4.90.0070.02912.80
5.4.80.0120.02812.75
5.4.70.0050.02712.84
5.4.60.0060.03012.86
5.4.50.0060.01412.79
5.4.40.0070.01812.89
5.4.30.0070.02612.89
5.4.20.0020.01912.81
5.4.10.0040.02112.69
5.4.00.0060.01912.65
5.3.290.0180.02812.53
5.3.280.0120.02912.54
5.3.270.0090.02912.57
5.3.260.0180.02912.48
5.3.250.0170.02312.54
5.3.240.0080.03412.48
5.3.230.0130.02712.49
5.3.220.0150.02312.39
5.3.210.0110.02812.44
5.3.200.0210.02712.47
5.3.190.0130.02912.49
5.3.180.0100.02412.56
5.3.170.0070.02912.53
5.3.160.0100.02612.52
5.3.150.0050.02712.50
5.3.140.0030.02812.53
5.3.130.0070.02512.49
5.3.120.0080.02412.46
5.3.110.0060.02712.50
5.3.100.0090.02512.49
5.3.90.0060.02212.50
5.3.80.0040.03012.38
5.3.70.0050.02712.43
5.3.60.0030.03012.44
5.3.50.0020.01812.46
5.3.40.0070.02612.49
5.3.30.0040.02912.56
5.3.20.0040.02612.50
5.3.10.0050.02612.35
5.3.00.0020.03012.46
5.2.170.0010.02512.23
5.2.160.0060.02012.24
5.2.150.0050.02112.16
5.2.140.0040.02412.14
5.2.130.0030.02512.14
5.2.120.0040.02112.14
5.2.110.0070.02012.16
5.2.100.0020.02512.16
5.2.90.0020.01912.15
5.2.80.0020.02312.16
5.2.70.0050.02212.01
5.2.60.0030.02512.02
5.2.50.0050.01912.00
5.2.40.0020.02112.14
5.2.30.0020.02312.14
5.2.20.0050.01212.02
5.2.10.0070.02212.00
5.2.00.0030.02212.05
5.1.60.0050.01711.80
5.1.50.0040.02011.85
5.1.40.0060.01911.87
5.1.30.0020.01611.88
5.1.20.0030.02011.90
5.1.10.0050.02011.88
5.1.00.0010.02511.87
5.0.50.0040.01611.79
5.0.40.0030.01611.79
5.0.30.0000.02611.79
5.0.20.0030.01511.79
5.0.10.0020.01711.79
5.0.00.0030.01311.79
4.4.90.0000.01511.79
4.4.80.0020.01611.79
4.4.70.0000.01611.79
4.4.60.0010.01511.79
4.4.50.0010.01211.79
4.4.40.0000.02211.79
4.4.30.0020.01411.79
4.4.20.0020.01411.79
4.4.10.0040.01211.79
4.4.00.0050.01711.79
4.3.110.0030.01011.79
4.3.100.0050.00711.79
4.3.90.0010.01211.79
4.3.80.0030.01911.79
4.3.70.0020.01311.79
4.3.60.0040.01211.79
4.3.50.0050.01211.79
4.3.40.0020.01911.79
4.3.30.0020.01411.79
4.3.20.0010.01311.79
4.3.10.0020.01311.79
4.3.00.0020.01111.79

preferences:
79.14 ms | 400 KiB | 5 Q