3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<!DOCTYPE html> <html> <body> <?php // 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><br>"; //The mktime() function is useful for doing date arithmetic and validation. //It will automatically calculate the correct value for out-of-range input: echo date("M-d-Y",mktime(0,0,0,12,36,2001)) . "<br>"; echo date("M-d-Y",mktime(0,0,0,14,1,2001)) . "<br>"; echo date("M-d-Y",mktime(0,0,0,1,1,2001)) . "<br>"; echo date("M-d-Y",mktime(0,0,0,1,1,99)) . "<br>"; ?> </body> </html>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<!DOCTYPE html> <html> <body> Oct 3, 1975 was on a Friday<br><br>Jan-05-2002<br>Feb-01-2002<br>Jan-01-2001<br>Jan-01-1999<br> </body> </html>