3v4l.org

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