3v4l.org

run code in 300+ PHP versions simultaneously
<!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>

preferences:
38.2 ms | 402 KiB | 5 Q