3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $current_day = date("N"); $days_from_monday = $current_day - 1; $monday = date("m-d-Y", strtotime("- {$days_from_monday} Days")); echo $monday;
Output for 5.1.2 - 7.1.0
04-07-2014
Output for 5.1.0 - 5.1.1
01-01-1970
Output for 4.3.0 - 5.0.5
04-09-2014