3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = new DateTime(''); $end = new DateTime('+7 days'); $interval = new DateInterval('P0D'); $period = new DatePeriod($start, $interval, $end); foreach ($period as $dt) { if ($dt->format("N") === 7) { $end->add(new DateInterval('P2D')); } else { echo $dt->format("l Y-m-d") . PHP_EOL; } }

Abusive script

This script was stopped while abusing our resources