<?php
$d = new DateTime('2015-01-31');
$d->modify('first day of next month');
echo $d->format('Y-m-28');
?>
PD9waHAKICAgICRkID0gbmV3IERhdGVUaW1lKCcyMDE1LTAxLTMxJyk7CiAgICAkZC0+bW9kaWZ5KCdmaXJzdCBkYXkgb2YgbmV4dCBtb250aCcpOwogICAgZWNobyAkZC0+Zm9ybWF0KCdZLW0tMjgnKTsKPz4=