3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function lastWeekDay ($mnt) { $result = strtotime("last day of $mnt"); $day = date('D', $result); if ('Sun' === $day) { $result -= 86400 * 2; } if ('Sat' === $day) { $result -= 86400; } return $result; } $input = 'Jan-04-2014'; $a = explode('-',$input); $result = strftime("%b",mktime(0,0,0,$a[0])).'-'.intval($a[1]); echo $result;
Output for 7.0.0 - 7.1.0
Warning: mktime() expects parameter 4 to be integer, string given in /in/WT5nC on line 21 Jan-4
Output for 5.1.0 - 5.6.28
Warning: mktime() expects parameter 4 to be long, string given in /in/WT5nC on line 21 Jan-4
Output for 4.3.0 - 5.0.5
Dec-4