3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = date('l'); if($test = "Sunday"){ $end = strtotime('Sunday last week'); $start = strtotime('Monday last week'); }else{ $end = strtotime('Sunday this week'); $start = strtotime('Monday last week'); } echo $end; echo '<br>'; echo $start;

preferences:
46.37 ms | 402 KiB | 5 Q