3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTimeImmutable; $next = new DateTimeImmutable("last day of next week - 4 weekdays"); var_dump($now->format('d.m.Y'), $next->format('d.m.Y'), $next->diff($now)->format('%a'), $next->format('d.m.Y'));

preferences:
44.09 ms | 402 KiB | 5 Q