3v4l.org

run code in 300+ PHP versions simultaneously
<?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; ?>

preferences:
30.01 ms | 402 KiB | 5 Q