3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (date('w') == 2) { $last_tuesday = date('Y-m-d'); } else { $last_tuesday = date('Y-m-d', strtotime('last tuesday')); } echo $last_tuesday;
Output for 4.3.0 - 7.2.0
2012-10-23