3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dts = array( "2012/09/03", "2012/12/25", "2012/12/26", "1 apr 2013", "30 apr 2013", "9 may 2013", "10 may 2013", "20 may 2013", "25 dec 2013", "26 dec 2013", "27 dec 2013", "30 dec 2013", "31 dec 2013", "1 jan 2014", ); foreach ($dts as $dt) { $dt = new DateTime($dt); echo $dt->format('r')."\n"; }
Output for 5.2.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Mon, 03 Sep 2012 00:00:00 +0200 Tue, 25 Dec 2012 00:00:00 +0100 Wed, 26 Dec 2012 00:00:00 +0100 Mon, 01 Apr 2013 00:00:00 +0200 Tue, 30 Apr 2013 00:00:00 +0200 Thu, 09 May 2013 00:00:00 +0200 Fri, 10 May 2013 00:00:00 +0200 Mon, 20 May 2013 00:00:00 +0200 Wed, 25 Dec 2013 00:00:00 +0100 Thu, 26 Dec 2013 00:00:00 +0100 Fri, 27 Dec 2013 00:00:00 +0100 Mon, 30 Dec 2013 00:00:00 +0100 Tue, 31 Dec 2013 00:00:00 +0100 Wed, 01 Jan 2014 00:00:00 +0100
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/J3IE2 on line 20
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/J3IE2 on line 20
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/J3IE2 on line 20