3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $now = time(); $date = strtotime('2015-05-01'); $total_days = floor(($now - $date)/60/60/24); $weeks = floor($total_days/7); $days = $total_days % 7; echo $weeks . ' weeks and ' . $days . ' days ago';
Output for 4.3.0 - 7.1.0
-49 weeks and -3 days ago