Version difference for strtotime('first day of last month')?
You should use the mktime() function:
<?php
echo date('Y-m-d', mktime(0,0,0,date('n')-1,1,date('Y'))); //2012-03-01
?>
See In Action
date('Y-m-d', strtotime('first day of -1 month'))
Works fine on PHP 7.0