3v4l.org

run code in 200+ 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.7
string(4) "2013"