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('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.0100.00716.50
8.3.50.0140.00522.09
8.3.40.0000.01518.71
8.3.30.0000.01419.09
8.3.20.0080.00020.07
8.3.10.0040.00423.48
8.3.00.0090.00018.76
8.2.180.0140.00716.85
8.2.170.0090.00622.96
8.2.160.0070.00720.43
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0080.00020.77
8.2.110.0060.00322.23
8.2.100.0030.00918.16
8.2.90.0040.00419.48
8.2.80.0030.00517.97
8.2.70.0000.00917.75
8.2.60.0080.00817.80
8.2.50.0000.00818.07
8.2.40.0000.00920.20
8.2.30.0040.00418.39
8.2.20.0040.00417.99
8.2.10.0030.00518.27
8.2.00.0060.00317.89
8.1.280.0140.00325.92
8.1.270.0050.00323.79
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00724.02
8.1.230.0080.00421.03
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0090.00017.38
8.1.190.0050.00317.48
8.1.180.0030.00519.26
8.1.170.0030.00618.74
8.1.160.0000.00821.96
8.1.150.0110.00018.89
8.1.140.0050.00217.70
8.1.130.0050.00217.96
8.1.120.0050.00217.78
8.1.110.0050.00317.66
8.1.100.0000.00717.68
8.1.90.0080.00017.69
8.1.80.0000.00717.70
8.1.70.0030.00317.69
8.1.60.0000.00817.75
8.1.50.0050.00317.64
8.1.40.0090.00017.63
8.1.30.0030.00517.75
8.1.20.0000.00717.72
8.1.10.0000.00817.64
8.1.00.0040.00417.66
8.0.300.0050.00318.77
8.0.290.0000.00817.18
8.0.280.0070.00018.58
8.0.270.0000.00817.40
8.0.260.0060.00017.31
8.0.250.0030.00317.26
8.0.240.0000.00817.21
8.0.230.0030.00317.16
8.0.220.0030.00317.23
8.0.210.0000.00717.03
8.0.200.0050.00217.24
8.0.190.0000.00717.16
8.0.180.0000.00717.17
8.0.170.0040.00417.25
8.0.160.0040.00417.18
8.0.150.0070.00016.96
8.0.140.0000.00817.02
8.0.130.0050.00013.57
8.0.120.0040.00417.00
8.0.110.0000.00717.13
8.0.100.0040.00417.14
8.0.90.0000.00816.98
8.0.80.0120.00317.13
8.0.70.0050.00317.09
8.0.60.0000.00817.21
8.0.50.0040.00416.97
8.0.30.0110.00817.37
8.0.20.0070.01017.40
8.0.10.0070.00017.29
8.0.00.0130.00417.04
7.4.330.0000.00515.22
7.4.320.0030.00316.69
7.4.300.0000.00616.61
7.4.290.0040.00416.73
7.4.280.0040.00416.71
7.4.270.0030.00316.82
7.4.260.0070.00416.59
7.4.250.0000.00716.67
7.4.240.0000.00716.76
7.4.230.0080.00016.59
7.4.220.0090.01216.75
7.4.210.0080.00816.72
7.4.200.0030.00316.89
7.4.190.0000.00716.89
7.4.160.0120.00416.48
7.4.150.0120.01317.40
7.4.140.0050.01517.86
7.4.130.0080.01116.75
7.4.120.0080.00816.73
7.4.110.0060.01016.63
7.4.100.0090.00916.61
7.4.90.0090.00816.84
7.4.80.0170.00719.39
7.4.70.0090.00916.71
7.4.60.0120.00616.59
7.4.50.0040.00416.79
7.4.40.0110.00516.69
7.4.30.0080.00816.74
7.4.00.0030.00715.31
7.3.330.0030.00313.47
7.3.320.0000.00613.33
7.3.310.0030.00316.59
7.3.300.0030.00316.45
7.3.290.0090.00616.50
7.3.280.0080.01016.48
7.3.270.0170.00017.40
7.3.260.0140.00816.68
7.3.250.0110.00616.68
7.3.240.0070.01016.73
7.3.230.0100.00716.79
7.3.210.0090.01016.75
7.3.200.0130.01019.39
7.3.190.0110.00716.64
7.3.180.0130.00716.79
7.3.170.0070.01016.83
7.3.160.0070.01016.55
7.3.120.0070.00715.04
7.2.330.0150.00817.08
7.2.320.0040.01516.76
7.2.310.0060.01117.08
7.2.300.0090.00616.73
7.2.290.0120.00617.04
7.2.00.0130.00319.85
7.1.100.0030.00818.16
7.1.70.0110.00417.17
7.1.60.0140.00717.61
7.1.50.0050.01417.33
7.1.40.0100.01316.77
7.1.30.0150.00916.94
7.1.20.0080.01116.84
7.1.10.0080.00816.92
7.1.00.0090.00616.85
7.0.200.0120.00417.15
7.0.190.0090.00616.81
7.0.180.0120.00316.29
7.0.170.0100.00516.42
7.0.160.0090.00916.43
7.0.150.0140.00316.40
7.0.140.0080.00816.34
7.0.130.0120.00416.63
7.0.120.0140.00316.63
7.0.110.0060.00616.59
7.0.100.0080.00416.43
7.0.90.0030.01016.40
7.0.80.0040.00816.59
7.0.70.0040.00716.44
7.0.60.0050.00516.43
7.0.50.0060.00916.48
7.0.40.0040.00415.25
7.0.30.0040.00415.25
7.0.20.0040.00415.25
7.0.10.0030.00915.25
7.0.00.0000.01315.25
5.6.300.0030.05420.88
5.6.290.0000.06120.63
5.6.280.0030.04120.91
5.6.270.0000.05421.04
5.6.260.0000.05020.82
5.6.250.0030.04620.88
5.6.240.0030.04920.89
5.6.230.0030.04620.80
5.6.220.0000.05220.96
5.6.210.0030.04021.05
5.6.200.0000.04421.05
5.6.190.0000.04520.82
5.6.180.0030.04520.93
5.6.170.0030.04321.03
5.6.160.0060.05120.82
5.6.150.0000.04720.86
5.6.140.0000.04820.95
5.6.130.0030.04720.93
5.6.120.0030.04120.83
5.6.110.0070.04120.95
5.6.100.0030.04420.73
5.6.90.0030.04320.80
5.6.80.0060.03920.22
5.6.70.0030.03720.43
5.6.60.0070.04920.20
5.6.50.0060.03820.42
5.6.40.0030.04420.35
5.6.30.0030.04020.32
5.6.20.0030.04020.29
5.6.10.0030.05520.41
5.6.00.0000.04720.20
5.5.380.0070.03917.57
5.5.370.0070.03917.50
5.5.360.0030.04717.46
5.5.350.0070.04317.54
5.5.340.0000.04318.04
5.5.330.0030.05017.97
5.5.320.0100.03617.82
5.5.310.0100.05118.07
5.5.300.0070.05017.94
5.5.290.0100.03918.02
5.5.280.0070.04117.74
5.5.270.0040.03917.96
5.5.260.0100.03917.83
5.5.250.0000.04417.87
5.5.240.0070.03617.22
5.5.230.0030.08117.41
5.5.220.0030.05017.23
5.5.210.0030.04117.41
5.5.200.0060.03217.09
5.5.190.0030.08317.35
5.5.180.0030.08117.46
5.5.160.0000.05017.47
5.5.150.0070.04917.29
5.5.140.0070.03917.41
5.5.130.0030.04117.38
5.5.120.0030.03717.37
5.5.110.0030.04517.38
5.5.100.0030.03917.00
5.5.90.0000.05217.22
5.5.80.0000.04117.22
5.5.70.0030.03617.20
5.5.60.0070.04316.95
5.5.50.0070.04016.98
5.5.40.0070.07817.22
5.5.30.0030.03617.21
5.5.20.0070.07217.31
5.5.10.0000.07617.36
5.5.00.0030.06217.26
5.4.450.0030.04419.34
5.4.440.0130.07219.43
5.4.430.0030.05119.41
5.4.420.0000.04119.30
5.4.410.0000.04719.07
5.4.400.0040.03518.88
5.4.390.0100.07519.02
5.4.380.0000.03918.91
5.4.370.0030.04018.91
5.4.360.0030.08019.07
5.4.350.0000.09819.16
5.4.340.0070.07719.07
5.4.320.0030.05318.85
5.4.310.0070.03719.07
5.4.300.0030.04519.16
5.4.290.0060.03918.82
5.4.280.0030.03919.00
5.4.270.0060.03619.01
5.4.260.0060.03818.97
5.4.250.0000.04218.91
5.4.240.0000.04319.13
5.4.230.0000.03919.16
5.4.220.0060.04218.98
5.4.210.0000.06918.90
5.4.200.0100.05019.09
5.4.190.0000.08518.97
5.4.180.0030.04419.02
5.4.170.0030.03918.84
5.4.160.0070.03618.89
5.4.150.0070.08019.14
5.4.140.0070.04916.39
5.4.130.0000.04216.44
5.4.120.0100.03016.64
5.4.110.0030.07216.40
5.4.100.0070.03116.63
5.4.90.0000.04816.50
5.4.80.0030.05016.39
5.4.70.0030.03916.50
5.4.60.0030.03916.31
5.4.50.0060.03516.66
5.4.40.0030.04516.62
5.4.30.0060.03216.30
5.4.20.0000.03716.61
5.4.10.0030.03616.63
5.4.00.0030.03315.98
5.3.290.0040.03615.25
5.3.280.0030.03815.25
5.3.270.0030.04715.25
5.3.260.0030.06315.25
5.3.250.0030.04615.25
5.3.240.0000.04215.25
5.3.230.0000.04015.25
5.3.220.0090.05915.25
5.3.210.0030.04415.25
5.3.200.0060.07115.25
5.3.190.0030.03615.25
5.3.180.0070.04315.25
5.3.170.0030.04115.25
5.3.160.0070.04315.25
5.3.150.0000.08215.25
5.3.140.0030.06215.25
5.3.130.0000.04215.25
5.3.120.0090.03215.25
5.3.110.0030.05215.25
5.3.100.0030.04115.25
5.3.90.0030.04815.25
5.3.80.0000.04015.25
5.3.70.0000.03915.25
5.3.60.0030.03815.25
5.3.50.0030.03715.25
5.3.40.0030.06815.25
5.3.30.0000.04215.25
5.3.20.0070.03015.25
5.3.10.0030.06415.25
5.3.00.0160.02915.25
5.2.170.0060.03815.25
5.2.160.0030.06315.25
5.2.150.0000.06215.25
5.2.140.0030.03015.25
5.2.130.0060.02515.25
5.2.120.0030.04615.25
5.2.110.0030.05815.25
5.2.100.0030.03415.25
5.2.90.0130.04715.25
5.2.80.0060.02515.25
5.2.70.0060.04415.25
5.2.60.0070.03715.25
5.2.50.0000.04615.25
5.2.40.0070.05915.25
5.2.30.0090.03115.25
5.2.20.0040.02815.25
5.2.10.0100.02915.25
5.2.00.0000.03615.25
5.1.60.0060.02315.25
5.1.50.0070.03415.25
5.1.40.0030.04415.25
5.1.30.0070.06015.25
5.1.20.0000.03115.25
5.1.10.0060.02115.25
5.1.00.0040.02515.25
5.0.50.0040.02815.25
5.0.40.0110.02615.25
5.0.30.0030.03415.25
5.0.20.0030.02415.25
5.0.10.0000.02215.25
5.0.00.0030.06415.25
4.4.90.0000.01715.25
4.4.80.0030.02915.25
4.4.70.0060.01215.25
4.4.60.0000.01815.25
4.4.50.0060.01115.25
4.4.40.0030.04515.25
4.4.30.0000.03415.25
4.4.20.0000.01715.25
4.4.10.0060.01115.25
4.4.00.0100.04515.25
4.3.110.0000.02015.25
4.3.100.0000.03015.25
4.3.90.0030.02515.25
4.3.80.0030.02415.25
4.3.70.0000.01815.25
4.3.60.0060.01015.25
4.3.50.0000.01815.25
4.3.40.0040.02115.25
4.3.30.0000.01715.25
4.3.20.0030.03415.25
4.3.10.0030.03515.25
4.3.00.0000.03615.25

preferences:
41.5 ms | 400 KiB | 5 Q