3v4l.org

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

preferences:
36.65 ms | 402 KiB | 5 Q