3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sunday = new DateTimeImmutable('Sunday'); for ($dow = 0; $dow <= 6; $dow++) { $weekday = $sunday->add(new DateInterval('P'. $dow .'D')); printf('%s = %s (%s)' . PHP_EOL, $dow, $weekday->format('l'), $weekday->format('D')); }

preferences:
25.62 ms | 404 KiB | 5 Q