3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime('7 days ago 00:00:00'); echo $date->format('r'); echo PHP_EOL; $date = new DateTime('today 23:59:59'); echo $date->format('r');
Output for 5.2.0 - 5.3.28, 5.4.0 - 5.4.25, 5.6.28, 7.0.14 - 7.1.0
Wed, 05 Feb 2014 00:00:00 +0100 Wed, 12 Feb 2014 23:59:59 +0100
Output for 7.0.6
Tue, 26 Apr 2016 00:00:00 +0200 Tue, 03 May 2016 23:59:59 +0200
Output for 5.6.14, 7.0.5
Sat, 26 Mar 2016 00:00:00 +0100 Sat, 02 Apr 2016 23:59:59 +0200
Output for 7.0.4
Thu, 03 Mar 2016 00:00:00 +0100 Thu, 10 Mar 2016 23:59:59 +0100
Output for 7.0.3
Fri, 11 Mar 2016 00:00:00 +0100 Fri, 18 Mar 2016 23:59:59 +0100
Output for 7.0.2
Tue, 15 Mar 2016 00:00:00 +0100 Tue, 22 Mar 2016 23:59:59 +0100
Output for 7.0.1
Wed, 16 Mar 2016 00:00:00 +0100 Wed, 23 Mar 2016 23:59:59 +0100
Output for 7.0.0
Sat, 19 Mar 2016 00:00:00 +0100 Sat, 26 Mar 2016 23:59:59 +0100
Output for hhvm-3.12.0
Fri, 04 Mar 2016 00:00:00 +0100 Fri, 11 Mar 2016 23:59:59 +0100
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.21
Mon, 25 Apr 2016 00:00:00 +0200 Mon, 02 May 2016 23:59:59 +0200
Output for 5.6.20
Sat, 02 Apr 2016 00:00:00 +0200 Sat, 09 Apr 2016 23:59:59 +0200
Output for 5.6.19
Mon, 29 Feb 2016 00:00:00 +0100 Mon, 07 Mar 2016 23:59:59 +0100
Output for 5.6.18
Mon, 07 Mar 2016 00:00:00 +0100 Mon, 14 Mar 2016 23:59:59 +0100
Output for 5.6.17
Sat, 12 Mar 2016 00:00:00 +0100 Sat, 19 Mar 2016 23:59:59 +0100
Output for 5.6.16
Sun, 20 Mar 2016 00:00:00 +0100 Sun, 27 Mar 2016 23:59:59 +0200
Output for 5.6.15
Mon, 21 Mar 2016 00:00:00 +0100 Mon, 28 Mar 2016 23:59:59 +0200
Output for 5.6.13
Fri, 08 Apr 2016 00:00:00 +0200 Fri, 15 Apr 2016 23:59:59 +0200
Output for 5.6.12
Tue, 12 Apr 2016 00:00:00 +0200 Tue, 19 Apr 2016 23:59:59 +0200
Output for 5.6.11
Sat, 16 Apr 2016 00:00:00 +0200 Sat, 23 Apr 2016 23:59:59 +0200
Output for 5.6.10
Mon, 18 Apr 2016 00:00:00 +0200 Mon, 25 Apr 2016 23:59:59 +0200
Output for 5.6.9
Wed, 20 Apr 2016 00:00:00 +0200 Wed, 27 Apr 2016 23:59:59 +0200
Output for 5.6.8
Fri, 22 Apr 2016 00:00:00 +0200 Fri, 29 Apr 2016 23:59:59 +0200
Output for 5.6.7
Wed, 18 May 2016 00:00:00 +0200 Wed, 25 May 2016 23:59:59 +0200
Output for 5.5.35
Sun, 15 May 2016 00:00:00 +0200 Sun, 22 May 2016 23:59:59 +0200
Output for 5.5.34
Sun, 03 Apr 2016 00:00:00 +0200 Sun, 10 Apr 2016 23:59:59 +0200
Output for 5.5.33
Tue, 01 Mar 2016 00:00:00 +0100 Tue, 08 Mar 2016 23:59:59 +0100
Output for 5.5.32
Wed, 09 Mar 2016 00:00:00 +0100 Wed, 16 Mar 2016 23:59:59 +0100
Output for 5.5.31
Sun, 13 Mar 2016 00:00:00 +0100 Sun, 20 Mar 2016 23:59:59 +0100
Output for 5.5.30
Thu, 24 Mar 2016 00:00:00 +0100 Thu, 31 Mar 2016 23:59:59 +0200
Output for 5.5.29
Sat, 09 Apr 2016 00:00:00 +0200 Sat, 16 Apr 2016 23:59:59 +0200
Output for 5.5.28
Wed, 13 Apr 2016 00:00:00 +0200 Wed, 20 Apr 2016 23:59:59 +0200
Output for 5.5.27
Thu, 14 Apr 2016 00:00:00 +0200 Thu, 21 Apr 2016 23:59:59 +0200
Output for 5.5.26
Tue, 19 Apr 2016 00:00:00 +0200 Tue, 26 Apr 2016 23:59:59 +0200
Output for 5.5.25
Thu, 21 Apr 2016 00:00:00 +0200 Thu, 28 Apr 2016 23:59:59 +0200
Output for 5.5.24
Mon, 16 May 2016 00:00:00 +0200 Mon, 23 May 2016 23:59:59 +0200
Output for 5.4.45
Tue, 01 Sep 2015 00:00:00 +0200 Tue, 08 Sep 2015 23:59:59 +0200
Output for 5.4.41 - 5.4.44
Sun, 09 Aug 2015 00:00:00 +0200 Sun, 16 Aug 2015 23:59:59 +0200
Output for 5.4.39 - 5.4.40
Fri, 01 May 2015 00:00:00 +0200 Fri, 08 May 2015 23:59:59 +0200
Output for 5.4.38
Mon, 23 Feb 2015 00:00:00 +0100 Mon, 02 Mar 2015 23:59:59 +0100
Output for 5.4.36 - 5.4.37
Sun, 01 Feb 2015 00:00:00 +0100 Sun, 08 Feb 2015 23:59:59 +0100
Output for 5.4.34 - 5.4.35
Thu, 27 Nov 2014 00:00:00 +0100 Thu, 04 Dec 2014 23:59:59 +0100
Output for 5.3.29, 5.4.26 - 5.4.32
Sat, 30 Aug 2014 00:00:00 +0200 Sat, 06 Sep 2014 23:59:59 +0200
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/ldW1Q on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/ldW1Q on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/ldW1Q on line 3