3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startDate = '2017-03-31'; $endDate = '2017-05-14'; $fromDate = explode("-", $startDate); $toDate = explode("-", $endDate); $start = new DateTime($startDate); $end = new DateTime($endDate); $interval = DateInterval::createFromDateString('1 month'); $period = new DatePeriod($start, $interval, $end); //print_r($interval); foreach ($period as $dt) { $date = $dt->format("Y-m-d"); print $date.'<br>'; $firstDate = $date."-15"; $secondDate = $date."-28"; if((strtotime($endDate) >= strtotime($firstDate)) && (strtotime($startDate) <= strtotime($firstDate))) $res[] = $firstDate; if((strtotime($endDate) >= strtotime($secondDate)) && (strtotime($startDate) <= strtotime($secondDate))) $res[] = $secondDate; } print_r($res);

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.40.0090.00918.71
8.3.30.0120.00418.75
8.3.20.0090.00021.82
8.3.10.0080.00023.51
8.3.00.0040.00419.80
8.2.170.0120.00322.96
8.2.160.0100.00320.35
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0000.00720.66
8.2.120.0040.00426.35
8.2.110.0100.00022.27
8.2.100.0060.00618.16
8.2.90.0040.00419.47
8.2.80.0060.00318.05
8.2.70.0000.00917.63
8.2.60.0040.00418.18
8.2.50.0040.00418.17
8.2.40.0050.00220.67
8.2.30.0040.00421.20
8.2.20.0070.00018.28
8.2.10.0000.00718.15
8.2.00.0060.00318.26
8.1.270.0080.00019.03
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00624.02
8.1.230.0040.00822.26
8.1.220.0000.00817.80
8.1.210.0050.00318.77
8.1.200.0060.00317.60
8.1.190.0030.00617.48
8.1.180.0050.00318.10
8.1.170.0050.00318.72
8.1.160.0080.00019.15
8.1.150.0040.00419.08
8.1.140.0000.00819.71
8.1.130.0030.00318.99
8.1.120.0030.00517.72
8.1.110.0040.00417.71
8.1.100.0050.00317.63
8.1.90.0050.00217.60
8.1.80.0030.00717.75
8.1.70.0070.00017.66
8.1.60.0000.00817.82
8.1.50.0000.00917.76
8.1.40.0030.00517.72
8.1.30.0000.00917.79
8.1.20.0040.00417.92
8.1.10.0070.00017.80
8.1.00.0000.01217.80
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0000.00718.59
8.0.270.0000.00717.34
8.0.260.0000.00819.01
8.0.250.0030.00317.20
8.0.240.0030.00617.20
8.0.230.0070.00017.27
8.0.220.0000.00717.07
8.0.210.0000.00717.14
8.0.200.0000.00717.27
8.0.190.0060.00317.13
8.0.180.0080.00017.08
8.0.170.0080.00017.25
8.0.160.0000.00717.26
8.0.150.0040.00417.05
8.0.140.0040.00417.16
8.0.130.0030.00313.60
8.0.120.0060.00317.17
8.0.110.0060.00317.06
8.0.100.0030.00517.04
8.0.90.0040.00416.97
8.0.80.0070.01117.13
8.0.70.0040.00417.07
8.0.60.0050.00217.14
8.0.50.0000.00816.96
8.0.30.0110.00817.22
8.0.20.0090.01417.46
8.0.10.0070.00017.34
8.0.00.0130.00917.03
7.4.330.0000.00615.55
7.4.320.0000.00616.76
7.4.300.0030.00316.71
7.4.290.0030.00316.82
7.4.280.0050.00316.83
7.4.270.0030.00316.69
7.4.260.0000.00816.80
7.4.250.0060.00316.68
7.4.240.0040.00416.81
7.4.230.0040.00416.83
7.4.220.0100.00716.68
7.4.210.0090.00616.76
7.4.200.0040.00416.89
7.4.160.0090.00816.87
7.4.150.0120.00617.40
7.4.140.0090.01217.86
7.4.130.0120.00616.90
7.4.120.0100.00916.80
7.4.110.0060.01216.78
7.4.100.0200.00416.76
7.4.90.0090.00816.78
7.4.80.0130.00919.39
7.4.70.0110.00616.72
7.4.60.0100.00716.63
7.4.50.0090.00616.86
7.4.40.0070.01016.76
7.4.30.0060.01116.75
7.4.10.0040.01115.04
7.4.00.0070.01015.05
7.3.330.0000.00513.32
7.3.320.0000.00513.23
7.3.310.0000.00716.35
7.3.300.0030.00316.49
7.3.290.0040.01516.46
7.3.280.0100.00616.49
7.3.270.0070.01117.40
7.3.260.0110.01016.66
7.3.250.0120.00916.63
7.3.240.0130.00416.70
7.3.230.0000.01616.77
7.3.210.0140.00316.77
7.3.200.0060.01116.75
7.3.190.0120.00416.58
7.3.180.0110.01116.47
7.3.170.0090.01216.71
7.3.160.0000.01516.84
7.3.130.0040.01615.09
7.3.120.0070.01315.10
7.3.110.0040.01215.12
7.3.100.0060.00615.09
7.3.90.0100.00715.10
7.3.80.0080.00014.81
7.3.70.0000.01514.82
7.3.60.0000.01414.96
7.3.50.0050.00515.10
7.3.40.0000.01014.93
7.3.30.0090.00614.97
7.3.20.0060.00616.76
7.3.10.0080.00616.88
7.3.00.0000.01516.63
7.2.330.0130.01016.77
7.2.320.0110.00616.90
7.2.310.0060.01016.90
7.2.300.0120.00616.81
7.2.290.0070.01016.84
7.2.260.0070.01414.90
7.2.250.0070.01315.30
7.2.240.0070.01015.22
7.2.230.0110.00415.16
7.2.220.0030.01015.07
7.2.210.0070.00715.20
7.2.200.0150.00015.34
7.2.190.0090.00615.07
7.2.180.0110.00315.00
7.2.170.0100.00714.98
7.2.160.0090.00615.34
7.2.150.0060.00917.24
7.2.140.0030.01017.22
7.2.130.0090.00317.14
7.2.120.0040.00917.14
7.2.110.0050.00717.14
7.2.100.0090.00516.98
7.2.90.0020.01417.26
7.2.80.0040.00717.11
7.2.70.0030.00917.09
7.2.60.0070.00717.14
7.2.50.0060.00717.07
7.2.40.0030.00717.16
7.2.30.0030.01117.08
7.2.20.0110.00517.14
7.2.10.0070.00717.13
7.2.00.0050.00917.14
7.1.330.0030.01016.13
7.1.320.0030.00616.13
7.1.310.0100.00316.05
7.1.300.0040.01015.78
7.1.290.0070.01015.85
7.1.280.0060.00915.79
7.1.270.0030.01615.65
7.1.260.0000.00815.81
7.1.250.0060.00615.84
7.1.240.0060.00915.95
7.1.230.0030.00716.02
7.1.220.0090.00616.17
7.1.210.0060.00916.17
7.1.200.0030.01016.09
7.1.190.0130.00016.00
7.1.180.0030.01015.90
7.1.170.0030.01016.07
7.1.160.0040.00415.76
7.1.150.0000.01715.80
7.1.140.0000.01416.05
7.1.130.0000.01115.75
7.1.120.0030.01315.97
7.1.110.0030.00816.14
7.1.100.0040.01515.78
7.1.90.0100.00316.01
7.1.80.0080.00816.06
7.1.70.0030.00516.69
7.1.60.0680.01424.85
7.1.50.0550.00824.52
7.1.40.0540.00824.49
7.1.30.0770.01124.42
7.1.20.0430.01324.51
7.1.10.0430.00615.45
7.1.00.0650.01215.37
7.0.330.0070.01015.42
7.0.320.0030.00615.76
7.0.310.0030.00915.34
7.0.300.0070.00715.44
7.0.290.0030.00815.57
7.0.280.0000.01815.39
7.0.270.0040.00815.59
7.0.260.0110.00415.59
7.0.250.0070.00315.42
7.0.240.0070.00415.58
7.0.230.0030.01015.72
7.0.220.0060.00615.77
7.0.210.0030.00915.57
7.0.200.0800.00515.25
7.0.190.0690.00315.29
7.0.180.0450.00515.24
7.0.170.0690.00915.14
7.0.160.0400.01315.11
7.0.150.0520.01515.14
7.0.140.0700.01115.04
7.0.130.0650.00915.26
7.0.120.0560.00915.34
7.0.110.0390.00715.06
7.0.100.0350.01015.12
7.0.90.0320.01015.09
7.0.80.0410.01015.17
7.0.70.0430.01415.02
7.0.60.0550.01015.03
7.0.50.0380.00515.30
7.0.40.0300.00914.18
7.0.30.0500.01214.26
7.0.20.0850.01314.15
7.0.10.0430.00814.20
7.0.00.0530.01514.08
5.6.400.0060.00614.23
5.6.390.0040.01214.67
5.6.380.0000.01314.37
5.6.370.0090.00614.71
5.6.360.0090.00614.74
5.6.350.0030.01314.52
5.6.340.0030.01314.55
5.6.330.0000.01614.84
5.6.320.0080.00414.91
5.6.310.0040.00414.74
5.6.300.0120.00314.82
5.6.290.0110.00414.82
5.6.280.0060.00614.72
5.6.270.0040.01114.77
5.6.260.0090.00614.65
5.6.250.0030.01314.40
5.6.240.0040.00814.57
5.6.230.0070.00714.54
5.6.220.0030.00914.75
5.6.210.0140.00314.58
5.6.200.0040.01414.56
5.6.190.0030.01314.52
5.6.180.0000.01014.52
5.6.170.0060.00314.49
5.6.160.0030.00914.74
5.6.150.0080.00314.63
5.6.140.0040.01414.88
5.6.130.0070.00714.76
5.6.120.0060.01214.42
5.6.110.0160.00314.57
5.6.100.0070.00714.63
5.6.90.0030.00614.83
5.6.80.0000.00814.46
5.6.70.0070.00714.55
5.6.60.0070.00714.62
5.6.50.0100.00614.46
5.6.40.0030.00914.42
5.6.30.0070.00714.35
5.6.20.0100.00314.55
5.6.10.0040.01214.34
5.6.00.0060.00314.48

preferences:
61.44 ms | 400 KiB | 5 Q