<?php
//$d = new DateTime( '2010-01-31' );
//$d->modify( 'first day of next month' );
$day=strtotime( 'last day of +1 month', now('yyyy-MM-dd'));
//echo $day->toString('yyyy-MM-dd');
echo $day;
Fatal error: Uncaught Error: Call to undefined function now() in /in/ffYbK:4
Stack trace:
#0 {main}
thrown in /in/ffYbK on line 4
Process exited with code 255.