In a script that contains
date(\'Y-m-d\', strtotime(\'first day of last month\'))
in version 5.3.10 (localhost) I get, for example, \'2012
You should use the mktime() function:
See In Action