3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $firstDay = new DateTime('first day of this month'); $lastDay = new DateTime('last day of this month'); echo $firstDay->format(DateTime::RFC2822); echo "<br/>"; echo $lastDay->format(DateTime::RFC2822);
Output for 5.6.28, 7.0.20 - 7.2.0
Sun, 01 Nov 2015 10:00:50 +0100<br/>Mon, 30 Nov 2015 10:00:50 +0100
Output for 7.0.6
Sun, 01 May 2016 18:28:07 +0200<br/>Tue, 31 May 2016 18:28:07 +0200
Output for 7.0.5
Fri, 01 Apr 2016 06:53:24 +0200<br/>Sat, 30 Apr 2016 06:53:24 +0200
Output for 7.0.4
Tue, 01 Mar 2016 18:40:05 +0100<br/>Thu, 31 Mar 2016 18:40:05 +0200
Output for 7.0.3
Tue, 01 Mar 2016 19:48:28 +0100<br/>Thu, 31 Mar 2016 19:48:28 +0200
Output for 7.0.2
Tue, 01 Mar 2016 01:55:57 +0100<br/>Thu, 31 Mar 2016 01:55:57 +0200
Output for 7.0.1
Tue, 01 Mar 2016 05:35:36 +0100<br/>Thu, 31 Mar 2016 05:35:36 +0200
Output for 7.0.0
Tue, 01 Mar 2016 07:31:49 +0100<br/>Thu, 31 Mar 2016 07:31:49 +0200
Output for 5.6.21
Sun, 01 May 2016 13:37:21 +0200<br/>Tue, 31 May 2016 13:37:21 +0200
Output for 5.6.20
Fri, 01 Apr 2016 05:52:43 +0200<br/>Sat, 30 Apr 2016 05:52:43 +0200
Output for 5.6.19
Tue, 01 Mar 2016 02:51:26 +0100<br/>Thu, 31 Mar 2016 02:51:26 +0200
Output for 5.6.18
Tue, 01 Mar 2016 11:34:46 +0100<br/>Thu, 31 Mar 2016 11:34:46 +0200
Output for 5.6.17
Tue, 01 Mar 2016 23:14:21 +0100<br/>Thu, 31 Mar 2016 23:14:21 +0200
Output for 5.6.16
Tue, 01 Mar 2016 08:19:07 +0100<br/>Thu, 31 Mar 2016 08:19:07 +0200
Output for 5.6.15
Tue, 01 Mar 2016 09:09:46 +0100<br/>Thu, 31 Mar 2016 09:09:46 +0200
Output for 5.6.14
Fri, 01 Apr 2016 11:00:54 +0200<br/>Sat, 30 Apr 2016 11:00:54 +0200
Output for 5.6.13
Fri, 01 Apr 2016 15:25:10 +0200<br/>Sat, 30 Apr 2016 15:25:10 +0200
Output for 5.6.12
Fri, 01 Apr 2016 05:54:19 +0200<br/>Sat, 30 Apr 2016 05:54:19 +0200
Output for 5.6.11
Fri, 01 Apr 2016 12:16:44 +0200<br/>Sat, 30 Apr 2016 12:16:44 +0200
Output for 5.6.10
Fri, 01 Apr 2016 14:19:36 +0200<br/>Sat, 30 Apr 2016 14:19:36 +0200
Output for 5.6.9
Fri, 01 Apr 2016 19:29:45 +0200<br/>Sat, 30 Apr 2016 19:29:45 +0200
Output for 5.6.8
Fri, 01 Apr 2016 04:21:55 +0200<br/>Sat, 30 Apr 2016 04:21:55 +0200
Output for 5.5.35
Sun, 01 May 2016 20:46:34 +0200<br/>Tue, 31 May 2016 20:46:34 +0200
Output for 5.5.34
Fri, 01 Apr 2016 08:04:36 +0200<br/>Sat, 30 Apr 2016 08:04:36 +0200
Output for 5.5.33
Tue, 01 Mar 2016 05:34:30 +0100<br/>Thu, 31 Mar 2016 05:34:30 +0200
Output for 5.5.32
Tue, 01 Mar 2016 15:30:02 +0100<br/>Thu, 31 Mar 2016 15:30:02 +0200
Output for 5.5.31
Tue, 01 Mar 2016 02:16:11 +0100<br/>Thu, 31 Mar 2016 02:16:11 +0200
Output for 5.5.30
Fri, 01 Apr 2016 11:03:31 +0200<br/>Sat, 30 Apr 2016 11:03:31 +0200
Output for 5.5.29
Fri, 01 Apr 2016 05:48:26 +0200<br/>Sat, 30 Apr 2016 05:48:26 +0200
Output for 5.5.28
Fri, 01 Apr 2016 09:08:01 +0200<br/>Sat, 30 Apr 2016 09:08:01 +0200
Output for 5.5.27
Fri, 01 Apr 2016 10:54:35 +0200<br/>Sat, 30 Apr 2016 10:54:35 +0200
Output for 5.5.26
Fri, 01 Apr 2016 17:02:16 +0200<br/>Sat, 30 Apr 2016 17:02:16 +0200
Output for 5.5.25
Fri, 01 Apr 2016 23:54:46 +0200<br/>Sat, 30 Apr 2016 23:54:46 +0200
Output for 5.5.24
Sun, 01 May 2016 06:27:43 +0200<br/>Tue, 31 May 2016 06:27:43 +0200
Output for 5.4.44 - 5.4.45
Sun, 01 Nov 2015 10:00:58 +0100<br/>Mon, 30 Nov 2015 10:00:58 +0100
Output for 5.4.37 - 5.4.43
Sun, 01 Nov 2015 10:00:59 +0100<br/>Mon, 30 Nov 2015 10:00:59 +0100
Output for 5.4.29 - 5.4.36
Sun, 01 Nov 2015 10:01:00 +0100<br/>Mon, 30 Nov 2015 10:01:00 +0100
Output for 5.4.23 - 5.4.25, 5.4.27 - 5.4.28
Sun, 01 Nov 2015 10:01:01 +0100<br/>Mon, 30 Nov 2015 10:01:01 +0100
Output for 5.4.26

Process exited with code 137.
Output for 5.4.18 - 5.4.22
Sun, 01 Nov 2015 10:01:02 +0100<br/>Mon, 30 Nov 2015 10:01:02 +0100
Output for 5.4.11 - 5.4.17
Sun, 01 Nov 2015 10:01:03 +0100<br/>Mon, 30 Nov 2015 10:01:03 +0100
Output for 5.4.3 - 5.4.10
Sun, 01 Nov 2015 10:01:04 +0100<br/>Mon, 30 Nov 2015 10:01:04 +0100
Output for 5.3.26 - 5.4.2
Sun, 01 Nov 2015 10:01:05 +0100<br/>Mon, 30 Nov 2015 10:01:05 +0100
Output for 5.3.20 - 5.3.25
Sun, 01 Nov 2015 10:01:06 +0100<br/>Mon, 30 Nov 2015 10:01:06 +0100
Output for 5.3.19
Sun, 01 Nov 2015 10:01:07 +0100<br/>Mon, 30 Nov 2015 10:01:07 +0100