3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current = date('Y-m-d'); $nextBusinessDay = date('Y-m-d', strtotime($current . '+ 3 Weekday')); $interval = date_diff($current, $nextBusinessDay); $diff = $interval->format('%R%a days'); var_dump($interval, $diff);

preferences:
59.41 ms | 410 KiB | 5 Q