3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dateNow = date('Y-m-d', time()); $dateYearAgo = date('Y-m-d', strtotime('1 year ago')); var_dump($dateNow, $dateYearAgo);
Output for 4.3.0 - 7.1.0
string(10) "2014-07-21" string(10) "2013-07-21"