3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $currMonth = date('Y-m') ; $ts = time() ; $nextWed = false ; do { $currentWed = $nextWed ; $nextWedTS = strtotime('next wednesday', $ts) ; $ts = $nextWedTS ; $nextWed = date('Y-m-d', $nextWedTS) ; $nextWedMonth = date('Y-m', $nextWedTS) ; } while ($nextWedMonth == $currMonth) ; echo $currentWed;
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2014-02-26