3v4l.org

run code in 300+ PHP versions simultaneously
<?php function lastWeekDay($mnt) { $result = strtotime("01 $mnt"); $result = mktime(0, 0, 0, date('m', $result) + 1, 0, date('Y', $result)); return $result; } echo date('d-M-Y', lastWeekDay('Apr 2013'));

preferences:
54.86 ms | 402 KiB | 5 Q