3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $testArray = array(-1, 0, 1, "Feb"); for($i = 0, $size = count($testArray); $i < $size; ++$i) { $testDate = $testArray[$i]; echo $testDate, "\n"; echo strtotime($testDate), "\n"; echo date('r',strtotime($testDate)), "\n\n"; }
Output for 5.2.0 - 7.2.0
-1 1387642812 Sat, 21 Dec 2013 17:20:12 +0100 0 Thu, 01 Jan 1970 01:00:00 +0100 1 Thu, 01 Jan 1970 01:00:00 +0100 Feb 1361401200 Thu, 21 Feb 2013 00:00:00 +0100
Output for 5.1.0 - 5.1.6
-1 1387642812 Sat, 21 Dec 2013 17:20:12 +0100 0 Thu, 01 Jan 1970 01:00:00 +0100 1 Thu, 01 Jan 1970 01:00:00 +0100 Feb Thu, 01 Jan 1970 01:00:00 +0100
Output for 4.3.11 - 4.4.9, 5.0.4 - 5.0.5
-1 -1 Thu, 01 Jan 1970 00:59:59 +0100 0 1387580400 Sat, 21 Dec 2013 00:00:00 +0100 1 1387584000 Sat, 21 Dec 2013 01:00:00 +0100 Feb -1 Thu, 01 Jan 1970 00:59:59 +0100
Output for 4.3.0 - 4.3.10, 5.0.0 - 5.0.3
-1 -1 Thu, 1 Jan 1970 00:59:59 +0100 0 1387580400 Sat, 21 Dec 2013 00:00:00 +0100 1 1387584000 Sat, 21 Dec 2013 01:00:00 +0100 Feb -1 Thu, 1 Jan 1970 00:59:59 +0100