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