3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dateNow = date('YYYY-MM-DD', time()); $dateYearAgo = date('YYYY-MM-DD', strtotime($dateNow . ' -1 year')); var_dump($dateNow, $dateYearAgo);
Output for 4.3.0 - 7.1.0
string(30) "2014201420142014-JulJul-MonMon" string(30) "1970197019701970-JanJan-ThuThu"