3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Prints the day, date, month, year, time, AM or PM echo date("D, j F Y h:i:s") . "<br>"; // Print the array from getdate() print_r(getdate()); echo "<br><br>"; // Return date/time info of a timestamp; then format the output $mydate=getdate(date("U")); echo "$mydate[weekday], $mydate[month] $mydate[mday], $mydate[year]";
Output for 4.3.0 - 7.1.0
Thu, 15 May 2014 09:10:02<br>Array ( [seconds] => 2 [minutes] => 10 [hours] => 9 [mday] => 15 [wday] => 4 [mon] => 5 [year] => 2014 [yday] => 134 [weekday] => Thursday [month] => May [0] => 1400137802 ) <br><br>Thursday, May 15, 2014