3v4l.org

run code in 300+ PHP versions simultaneously
<?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 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.2 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
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>

preferences:
265.11 ms | 401 KiB | 368 Q