3v4l.org

run code in 300+ PHP versions simultaneously
<?php //echo strtotime('monday this week', time()); $thisWeek = new DateTime(); $dayOfWeek = ((int)$thisWeek->format('N'))-1; $thisWeek->modify("-$dayOfWeek days"); var_dump($thisWeek->format('d'));

preferences:
45.36 ms | 402 KiB | 5 Q