3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month=2; $dt=30; $year=2014; if(!checkdate($month, $dt, $year)){ echo \DateTime::createFromFormat('m', $month)->format('F') . " is not a valid date"; } else { $date = \DateTime::createFromFormat('d m Y', "$dt $month $year"); echo $date->format('jS F Y') . " will be a " . $date->format('l'); }

preferences:
36.95 ms | 402 KiB | 5 Q