3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Prints: October 3, 1975 was on a Friday echo "Oct 3, 1975 was on a ".date("l", mktime(0,0,0,10,3,1964)) . "<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>"; ?>
Output for 4.3.0 - 5.0.5, 5.1.2 - 7.1.0
Oct 3, 1975 was on a Saturday<br><br>Jan-05-2002<br>Feb-01-2002<br>Jan-01-2001<br>Jan-01-1999<br>
Output for 5.1.0 - 5.1.1
Oct 3, 1975 was on a Sunday<br><br>Jan-05-2002<br>Feb-01-2002<br>Jan-01-2001<br>Jan-01-1999<br>