3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fromDate = explode("-", '2017-01-28'); $toDate = explode("-", '2017-05-15'); $start = new DateTime('2017-01-28'); $start->modify('first day of this month'); $end = new DateTime('2017-05-15'); $end->modify('first day of next month'); $interval = DateInterval::createFromDateString('1 month'); $period = new DatePeriod($start, $interval, $end); foreach ($period as $dt) { $date = $dt->format("Y-m"); $firstDate = $date."-15"; $secondDate = $date."-28"; if((strtotime('2017-05-15') >= strtotime($firstDate)) && (strtotime('2017-01-28') <= strtotime($firstDate))) $res[] = $firstDate; if((strtotime('2017-05-15') >= strtotime($secondDate)) && (strtotime('2017-01-28') <= 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.70.0090.01218.52
8.3.60.0070.00717.00
8.3.50.0050.01217.41
8.3.40.0040.01219.00
8.3.30.0110.00418.92
8.3.20.0040.00421.87
8.3.10.0040.00423.73
8.3.00.0040.00419.56
8.2.190.0150.00016.87
8.2.180.0120.00618.41
8.2.170.0110.00422.96
8.2.160.0030.01020.36
8.2.150.0070.00724.18
8.2.140.0090.00024.66
8.2.130.0040.00420.47
8.2.120.0040.00426.35
8.2.110.0030.00721.12
8.2.100.0080.00317.97
8.2.90.0000.00919.32
8.2.80.0000.00818.16
8.2.70.0040.00417.73
8.2.60.0050.00318.05
8.2.50.0090.00018.10
8.2.40.0000.00820.68
8.2.30.0040.00421.18
8.2.20.0040.00418.15
8.2.10.0020.00518.18
8.2.00.0000.00718.15
8.1.280.0040.01125.92
8.1.270.0080.00020.76
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.00922.19
8.1.230.0080.00317.95
8.1.220.0040.00417.91
8.1.210.0090.00018.77
8.1.200.0040.00417.48
8.1.190.0000.00817.48
8.1.180.0030.00618.10
8.1.170.0080.00418.84
8.1.160.0070.00019.19
8.1.150.0040.00420.85
8.1.140.0030.00519.60
8.1.130.0080.00017.60
8.1.120.0030.00517.63
8.1.110.0000.00817.76
8.1.100.0040.00417.64
8.1.90.0000.00817.67
8.1.80.0060.00317.76
8.1.70.0040.00417.64
8.1.60.0000.00817.68
8.1.50.0040.00417.64
8.1.40.0040.00417.71
8.1.30.0030.00517.88
8.1.20.0080.00017.79
8.1.10.0030.00517.65
8.1.00.0080.00017.66
8.0.300.0070.00018.77
8.0.290.0080.00017.00
8.0.280.0040.00418.51
8.0.270.0000.00717.42
8.0.260.0040.00417.21
8.0.250.0080.00017.18
8.0.240.0050.00317.14
8.0.230.0060.00317.23
8.0.220.0020.00517.23
8.0.210.0040.00417.18
8.0.200.0000.00717.23
8.0.190.0030.00517.19
8.0.180.0070.00017.09
8.0.170.0040.00417.21
8.0.160.0000.00717.27
8.0.150.0040.00417.09
8.0.140.0000.00717.17
8.0.130.0040.00413.47
8.0.120.0040.00417.13
8.0.110.0040.00417.22
8.0.100.0000.00717.11
8.0.90.0070.00017.01
8.0.80.0030.01717.11
8.0.70.0050.00217.17
8.0.60.0070.00017.12
8.0.50.0050.00217.13
8.0.30.0100.00817.42
8.0.20.0120.00917.40
8.0.10.0070.00017.30
8.0.00.0130.00717.19
7.4.330.0020.00215.55
7.4.320.0040.00416.73
7.4.300.0030.00316.80
7.4.290.0070.00016.74
7.4.280.0060.00316.62
7.4.270.0030.00316.77
7.4.260.0000.00716.64
7.4.250.0000.00716.55
7.4.240.0070.00016.77
7.4.230.0030.00416.72
7.4.220.0210.00016.91
7.4.210.0030.01716.69
7.4.200.0000.00716.93
7.4.160.0120.00516.89
7.4.150.0170.00717.40
7.4.140.0070.01117.86
7.4.130.0110.00616.67
7.4.120.0130.00716.76
7.4.110.0050.01216.40
7.4.100.0100.01316.85
7.4.90.0130.00316.95
7.4.80.0070.01119.39
7.4.70.0100.00716.83
7.4.60.0030.01316.85
7.4.50.0000.01516.89
7.4.40.0060.01216.72
7.4.30.0080.00816.80
7.4.00.0060.01015.40
7.3.330.0000.00713.22
7.3.320.0060.00013.34
7.3.310.0040.00416.54
7.3.300.0030.00416.38
7.3.290.0070.00916.46
7.3.280.0070.00916.46
7.3.270.0120.00617.40
7.3.260.0120.00916.59
7.3.250.0090.01016.57
7.3.240.0080.00816.70
7.3.230.0130.01016.39
7.3.210.0100.00716.65
7.3.200.0160.00916.92
7.3.190.0120.00616.93
7.3.180.0060.00916.49
7.3.170.0030.01616.61
7.3.160.0090.00616.63
7.2.330.0070.01016.96
7.2.320.0150.00916.87
7.2.310.0140.00416.76
7.2.300.0120.00916.89
7.2.290.0030.01316.82
7.2.60.0080.00617.34
7.2.00.0000.01219.47
7.1.200.0140.00415.52
7.1.100.0000.01318.63
7.1.70.0160.00017.25
7.1.60.0230.03333.36
7.1.50.1030.01333.14
7.1.40.1770.01732.78
7.1.30.1900.01732.98
7.1.20.2130.01332.99
7.1.10.1800.01315.19
7.1.00.1700.02015.12
7.0.200.1330.01015.04
7.0.190.1330.00714.95
7.0.180.1500.00314.50
7.0.170.1630.02014.74
7.0.160.1700.01014.89
7.0.150.1670.01014.77
7.0.140.1630.01314.78
7.0.130.1570.01014.82
7.0.120.1730.00714.85
7.0.110.1530.01714.75
7.0.100.1700.01014.79
7.0.90.1900.02014.66
7.0.80.1170.00714.84
7.0.70.0900.01014.64
7.0.60.0830.01714.68
7.0.50.0900.01714.63
7.0.40.0900.02314.93
7.0.30.1130.01314.75
7.0.20.1070.01314.58
7.0.10.1330.01314.86
7.0.00.1030.01314.72

preferences:
58.35 ms | 401 KiB | 5 Q