3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dayoftheweek = date('w'); //PHP : from 0 (sunday) to 6 (pour saturday) if ($dayoftheweek == 0) $dayoftheweek = 7;

preferences:
50.82 ms | 402 KiB | 5 Q