3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month=12; $year=2014; $thisDate = strtotime('last day of this month ',strtotime($year.'/'.$month.'/1')); echo date('Y-m-d',$thisDate);

preferences:
37.76 ms | 402 KiB | 5 Q