modify("+2 day"); } $dt = new DateTime(); $dti = new DateTimeImmutable(); datemanip($dt); // BUG! datemanip($dti); function datemanip_fixed(DateTime $dt) { return clone $dt->momdify("+2 day"); // no difference to pre 5.5 code }