3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $prevYear = date("Y", strtotime("-1 year", strtotime(2013))); $nextYear = date("Y", strtotime("2013 +1 year")); var_dump($prevYear);
Output for 4.3.0 - 7.1.0
string(4) "2013"