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('Y-m-d H:i:s'));

preferences:
49.49 ms | 402 KiB | 5 Q