3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for($offset = 0; ; $offset -= 60 * 60 * 24){ $time = strtotime("now") + $offset; $now = date('D',$time); echo $now . "\n"; if( strtolower($now) == 'mon' ){ break; } } echo date("m-d-Y",$time) . "\n"; ?>
based on ta9Z8
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Tue Mon 10-13-2014