php last day of previous quarter code example Example: last day of previous month in php $lastDay = date('t',strtotime('last month')); print_r($lastDay);