3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $testArray = array("2013-08-21", "today", "21/08", "21-08", "21 08 2013", "21/08/2013", "21/08/13", "08/2013", "08-2013", "august"); $unixArray = array(); for($i = 0, $size = count($testArray); $i < $size; ++$i) { $testDate = $testArray[$i]; $unixArray[$i] = strtotime($testDate); } echo "ci sono ", count($unixArray); echo " valori \n" ; for($i = 0, $size = count($unixArray); $i < $size; ++$i) { $unixDate = $unixArray[$i]; echo $unixDate, " - "; // echo date('l H\:iO',$unixDate), " - "; echo date('r',$unixDate), " - "; echo $testArray[$i], " - "; echo "\n"; }
Output for 5.2.0 - 7.1.0
ci sono 10 valori 1377036000 - Wed, 21 Aug 2013 00:00:00 +0200 - 2013-08-21 - 1387580400 - Sat, 21 Dec 2013 00:00:00 +0100 - today - - Thu, 01 Jan 1970 01:00:00 +0100 - 21/08 - - Thu, 01 Jan 1970 01:00:00 +0100 - 21-08 - - Thu, 01 Jan 1970 01:00:00 +0100 - 21 08 2013 - - Thu, 01 Jan 1970 01:00:00 +0100 - 21/08/2013 - - Thu, 01 Jan 1970 01:00:00 +0100 - 21/08/13 - - Thu, 01 Jan 1970 01:00:00 +0100 - 08/2013 - - Thu, 01 Jan 1970 01:00:00 +0100 - 08-2013 - 1377036000 - Wed, 21 Aug 2013 00:00:00 +0200 - august -
Output for 5.1.0 - 5.1.6
ci sono 10 valori 1377036000 - Wed, 21 Aug 2013 00:00:00 +0200 - 2013-08-21 - 1387580400 - Sat, 21 Dec 2013 00:00:00 +0100 - today - - Thu, 01 Jan 1970 01:00:00 +0100 - 21/08 - - Thu, 01 Jan 1970 01:00:00 +0100 - 21-08 - - Thu, 01 Jan 1970 01:00:00 +0100 - 21 08 2013 - - Thu, 01 Jan 1970 01:00:00 +0100 - 21/08/2013 - - Thu, 01 Jan 1970 01:00:00 +0100 - 21/08/13 - - Thu, 01 Jan 1970 01:00:00 +0100 - 08/2013 - - Thu, 01 Jan 1970 01:00:00 +0100 - 08-2013 - - Thu, 01 Jan 1970 01:00:00 +0100 - august -
Output for 5.0.4 - 5.0.5
ci sono 10 valori 1377036000 - Wed, 21 Aug 2013 00:00:00 +0200 - 2013-08-21 - 1387644506 - Sat, 21 Dec 2013 17:48:26 +0100 - today - 1410127200 - Mon, 08 Sep 2014 00:00:00 +0200 - 21/08 - 1627768800 - Sun, 01 Aug 2021 00:00:00 +0200 - 21-08 - -1 - Thu, 01 Jan 1970 00:59:59 +0100 - 21 08 2013 - 1410127200 - Mon, 08 Sep 2014 00:00:00 +0200 - 21/08/2013 - 1410127200 - Mon, 08 Sep 2014 00:00:00 +0200 - 21/08/13 - 1549148400 - Sun, 03 Feb 2019 00:00:00 +0100 - 08/2013 - 6490188000 - Fri, 01 Sep 2175 00:00:00 +0200 - 08-2013 - -1 - Thu, 01 Jan 1970 00:59:59 +0100 - august -
Output for 5.0.3
ci sono 10 valori 1377036000 - Wed, 21 Aug 2013 00:00:00 +0200 - 2013-08-21 - 1387644506 - Sat, 21 Dec 2013 17:48:26 +0100 - today - 1410127200 - Mon, 8 Sep 2014 00:00:00 +0200 - 21/08 - 1627768800 - Sun, 1 Aug 2021 00:00:00 +0200 - 21-08 - -1 - Thu, 1 Jan 1970 00:59:59 +0100 - 21 08 2013 - 1410127200 - Mon, 8 Sep 2014 00:00:00 +0200 - 21/08/2013 - 1410127200 - Mon, 8 Sep 2014 00:00:00 +0200 - 21/08/13 - 1549148400 - Sun, 3 Feb 2019 00:00:00 +0100 - 08/2013 - 6490188000 - Fri, 1 Sep 2175 00:00:00 +0200 - 08-2013 - -1 - Thu, 1 Jan 1970 00:59:59 +0100 - august -
Output for 5.0.0 - 5.0.2
ci sono 10 valori 1377036000 - Wed, 21 Aug 2013 00:00:00 +0200 - 2013-08-21 - 1387580400 - Sat, 21 Dec 2013 00:00:00 +0100 - today - 1410127200 - Mon, 8 Sep 2014 00:00:00 +0200 - 21/08 - 1627768800 - Sun, 1 Aug 2021 00:00:00 +0200 - 21-08 - -1 - Thu, 1 Jan 1970 00:59:59 +0100 - 21 08 2013 - 1410127200 - Mon, 8 Sep 2014 00:00:00 +0200 - 21/08/2013 - 1410127200 - Mon, 8 Sep 2014 00:00:00 +0200 - 21/08/13 - 1549148400 - Sun, 3 Feb 2019 00:00:00 +0100 - 08/2013 - 6490188000 - Fri, 1 Sep 2175 00:00:00 +0200 - 08-2013 - -1 - Thu, 1 Jan 1970 00:59:59 +0100 - august -
Output for 4.3.11 - 4.4.9
ci sono 10 valori 1377036000 - Wed, 21 Aug 2013 00:00:00 +0200 - 2013-08-21 - 1387644506 - Sat, 21 Dec 2013 17:48:26 +0100 - today - 1410127200 - Mon, 08 Sep 2014 00:00:00 +0200 - 21/08 - -1 - Thu, 01 Jan 1970 00:59:59 +0100 - 21-08 - -1 - Thu, 01 Jan 1970 00:59:59 +0100 - 21 08 2013 - 1410127200 - Mon, 08 Sep 2014 00:00:00 +0200 - 21/08/2013 - 1410127200 - Mon, 08 Sep 2014 00:00:00 +0200 - 21/08/13 - 1549148400 - Sun, 03 Feb 2019 00:00:00 +0100 - 08/2013 - -1 - Thu, 01 Jan 1970 00:59:59 +0100 - 08-2013 - -1 - Thu, 01 Jan 1970 00:59:59 +0100 - august -
Output for 4.3.0 - 4.3.10
ci sono 10 valori 1377036000 - Wed, 21 Aug 2013 00:00:00 +0200 - 2013-08-21 - 1387644506 - Sat, 21 Dec 2013 17:48:26 +0100 - today - 1410127200 - Mon, 8 Sep 2014 00:00:00 +0200 - 21/08 - -1 - Thu, 1 Jan 1970 00:59:59 +0100 - 21-08 - -1 - Thu, 1 Jan 1970 00:59:59 +0100 - 21 08 2013 - 1410127200 - Mon, 8 Sep 2014 00:00:00 +0200 - 21/08/2013 - 1410127200 - Mon, 8 Sep 2014 00:00:00 +0200 - 21/08/13 - 1549148400 - Sun, 3 Feb 2019 00:00:00 +0100 - 08/2013 - -1 - Thu, 1 Jan 1970 00:59:59 +0100 - 08-2013 - -1 - Thu, 1 Jan 1970 00:59:59 +0100 - august -