3v4l.org

run code in 500+ 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:
45.42 ms | 1399 KiB | 5 Q