3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); $date->setDate(19987, 1, 2); var_dump($date->format('Y-m-d'));
based on DAC46
Output for 5.5.0 - 7.2.0
string(11) "19987-01-02"