3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Prints the day, date, month, year, time, AM or PM echo date("l jS \of F Y h:i:s A") . "<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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Thursday 15th of May 2014 09:01:11 AM<br>Array ( [seconds] => 11 [minutes] => 1 [hours] => 9 [mday] => 15 [wday] => 4 [mon] => 5 [year] => 2014 [yday] => 134 [weekday] => Thursday [month] => May [0] => 1400137271 ) <br><br>Thursday, May 15, 2014