3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = strtotime('this Thursday'); if($this_thr_str <= strtotime("now")){ echo 'This thurs'."\n"; $thrs = date('mdy',$str); }else{ echo 'Last Thurs'."\n"; $str = strtotime('last Tuesday'); $thrs = date('mdy',$str); } $link = 'http://marc.ucla.edu/mpeg/Hammer'.$thrs.'.mp3'; echo $link; // //echo date('mdy',$tuestr);

preferences:
47.43 ms | 402 KiB | 5 Q