3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('Month' => 07, 'Year' => 2014); $daysCount = cal_days_in_month(CAL_GREGORIAN, $array['Month'], $array['Year']); //obtain month days count $firstDay = mktime(0, 0, 0, $array['Month'], 1, $array['Year']); //obtain timestamp of specified month first day $lastDay = mktime(0, 0, 0, $array['Month'], $daysCount, $array['Year']); //obtain timestamp of specified month last day echo 'First: '.$firstDay.' Last: '.$lastDay; ?>
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
First: 1404165600 Last: 1406757600
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Call to undefined function cal_days_in_month() in /in/N5tr1 on line 4
Process exited with code 255.