3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Prints the day echo date("l") . "<br>"; // Prints the day, date, month, year, time, AM or PM echo date("l jS \of F Y h:i:s A") . "<br>"; // Prints October 3, 1975 was on a Friday echo "Oct 3,1975 was on a ".date("l", mktime(0,0,0,10,3,1975)) . "<br>"; // Use a constant in the format parameter echo date(DATE_RFC822) . "<br>"; // prints something like: 1975-10-03T00:00:00+00:00 echo date(DATE_ATOM,mktime(0,0,0,10,3,1975)); ?>
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Friday<br>Friday 20th of December 2013 08:36:45 AM<br>Oct 3,1975 was on a Friday<br>Fri, 20 Dec 13 08:36:45 +0100<br>1975-10-03T00:00:00+01:00
Output for 5.1.3 - 5.1.6
Friday<br>Friday 20th of December 2013 08:36:45 AM<br>Oct 3,1975 was on a Friday<br>Fri, 20 Dec 2013 08:36:45 CET<br>1975-10-03T00:00:00+01:00
Output for 5.1.1 - 5.1.2
Friday<br>Friday 20th of December 2013 08:36:45 AM<br>Oct 3,1975 was on a Friday<br>Fri, 20 Dec 2013 08:36:45 CET<br>1975-10-03T00:00:00+0100
Output for 4.3.0 - 5.1.0
Friday<br>Friday 20th of December 2013 08:36:45 AM<br>Oct 3,1975 was on a Friday<br> Notice: Use of undefined constant DATE_RFC822 - assumed 'DATE_RFC822' in /in/JInPl on line 12 FriAMCETE_RDecemberC822<br> Notice: Use of undefined constant DATE_ATOM - assumed 'DATE_ATOM' in /in/JInPl on line 15 FriAMCETE_AMCET+0100Oct