<?php $x = new DateTimeImmutable('2015-07-31'); $y = $x->modify('first day of -1 month'); var_dump($y); var_dump($y->setDate($y->format('Y'), $y->format('n'), 30));
You have javascript disabled. You will not be able to edit any code.