3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fromDate = explode("-", '2017-01-28'); $toDate = explode("-", '2017-05-14'); $start = new DateTime('2017-01-28'); $start->modify('first day of this month'); $end = new DateTime('2017-05-14'); $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-14') >= strtotime($firstDate)) && (strtotime('2017-01-28') <= strtotime($firstDate))) $res[] = $firstDate; if((strtotime('2017-05-14') >= 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.60.0040.01116.50
8.3.50.0090.00618.42
8.3.40.0070.01019.04
8.3.30.0040.01118.92
8.3.20.0000.00821.73
8.3.10.0070.00023.70
8.3.00.0060.00319.79
8.2.180.0060.01218.21
8.2.170.0110.00422.96
8.2.160.0100.00320.38
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0120.00626.16
8.2.120.0040.00421.24
8.2.110.0110.00020.52
8.2.100.0090.00318.16
8.2.90.0050.00319.34
8.2.80.0040.00418.05
8.2.70.0080.00017.88
8.2.60.0000.00818.05
8.2.50.0050.00518.18
8.2.40.0090.00020.72
8.2.30.0000.00821.25
8.2.20.0000.00718.18
8.2.10.0040.00418.27
8.2.00.0040.00418.17
8.1.280.0040.01125.92
8.1.270.0040.00420.85
8.1.260.0060.00326.35
8.1.250.0040.01128.09
8.1.240.0030.00722.65
8.1.230.0110.00019.16
8.1.220.0080.00017.91
8.1.210.0040.00418.77
8.1.200.0070.00317.47
8.1.190.0000.00817.13
8.1.180.0000.00818.10
8.1.170.0050.00318.82
8.1.160.0000.00719.07
8.1.150.0050.00320.71
8.1.140.0070.00019.72
8.1.130.0040.00420.75
8.1.120.0040.00417.73
8.1.110.0070.00017.76
8.1.100.0080.00017.79
8.1.90.0000.00717.66
8.1.80.0100.00017.69
8.1.70.0040.00417.70
8.1.60.0030.00517.73
8.1.50.0000.00917.66
8.1.40.0000.00817.70
8.1.30.0050.00317.93
8.1.20.0000.00817.85
8.1.10.0000.00817.80
8.1.00.0000.00817.71
8.0.300.0040.00418.77
8.0.290.0030.00516.88
8.0.280.0030.00318.52
8.0.270.0020.00517.42
8.0.260.0070.00018.98
8.0.250.0050.00517.27
8.0.240.0000.00717.27
8.0.230.0000.00717.27
8.0.220.0030.00317.09
8.0.210.0000.00717.11
8.0.200.0000.00717.13
8.0.190.0050.00317.12
8.0.180.0040.00417.08
8.0.170.0040.00417.11
8.0.160.0040.00417.18
8.0.150.0000.00817.18
8.0.140.0040.00417.09
8.0.130.0000.00713.49
8.0.120.0040.00417.14
8.0.110.0050.00317.11
8.0.100.0000.00717.04
8.0.90.0000.00717.15
8.0.80.0120.00317.22
8.0.70.0040.00417.20
8.0.60.0040.00417.13
8.0.50.0030.00517.15
8.0.30.0120.00817.33
8.0.20.0090.00917.45
8.0.10.0070.00017.31
8.0.00.0150.00317.04
7.4.330.0000.00515.55
7.4.320.0000.00716.83
7.4.300.0060.00016.66
7.4.290.0030.00316.76
7.4.280.0040.00416.71
7.4.270.0030.00516.58
7.4.260.0060.00316.85
7.4.250.0070.00016.70
7.4.240.0000.00716.73
7.4.230.0000.00716.70
7.4.220.0080.01116.77
7.4.210.0130.00716.72
7.4.200.0000.00716.82
7.4.160.0070.00916.75
7.4.150.0100.01317.40
7.4.140.0090.01217.86
7.4.130.0110.01116.89
7.4.120.0150.00916.88
7.4.110.0030.01316.83
7.4.100.0140.00716.79
7.4.90.0130.00416.78
7.4.80.0100.00719.39
7.4.70.0070.01416.63
7.4.60.0080.00816.79
7.4.50.0030.01316.64
7.4.40.0040.01616.57
7.4.30.0070.01116.66
7.4.00.0130.00315.10
7.3.330.0000.00713.38
7.3.320.0000.00713.38
7.3.310.0000.00716.55
7.3.300.0080.00016.38
7.3.290.0060.00916.45
7.3.280.0100.00816.48
7.3.270.0070.01017.40
7.3.260.0130.00816.72
7.3.250.0140.00516.44
7.3.240.0100.00816.53
7.3.230.0040.01416.84
7.3.210.0070.01116.54
7.3.200.0130.00316.75
7.3.190.0060.01016.68
7.3.180.0030.01416.71
7.3.170.0100.01016.64
7.3.160.0030.01316.58
7.3.10.0140.00716.46
7.3.00.0190.00916.40
7.2.330.0100.00716.63
7.2.320.0060.01916.98
7.2.310.0170.00017.17
7.2.300.0090.01217.05
7.2.290.0130.00317.05
7.2.130.0180.00616.56
7.2.120.0200.00616.68
7.2.110.0130.01017.05
7.2.100.0140.00916.55
7.2.90.0090.01216.82
7.2.80.0130.01316.65
7.2.70.0210.01116.84
7.2.60.0090.00917.04
7.2.50.0110.00617.15
7.2.40.0180.01516.95
7.2.30.0130.01016.45
7.2.20.0170.01416.89
7.2.10.0260.00917.07
7.2.00.0230.00017.16
7.1.250.0120.01615.71
7.1.200.0040.01115.78
7.1.70.0050.00317.50
7.1.60.1030.01033.18
7.1.50.0800.01333.23
7.1.40.1430.01332.89
7.1.30.1470.01032.98
7.1.20.0900.01333.21
7.1.10.0830.01314.75
7.1.00.1000.00715.36
7.0.200.1100.01315.04
7.0.190.1230.00715.09
7.0.180.0930.01014.55
7.0.170.1230.00714.66
7.0.160.1800.01314.61
7.0.150.0830.00714.61
7.0.140.1230.01014.75
7.0.130.1170.01314.82
7.0.120.1500.01315.15
7.0.110.0970.00714.75
7.0.100.1270.01314.66
7.0.90.0900.01314.78
7.0.80.1100.01014.71
7.0.70.0970.00314.61
7.0.60.1100.01014.55
7.0.50.0970.01314.51
7.0.40.0930.01314.57
7.0.30.0830.01014.96
7.0.20.0930.00714.71
7.0.10.0900.01014.77
7.0.00.1100.01014.73

preferences:
68.27 ms | 400 KiB | 5 Q