3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new \Datetime('first day of +3 month'); $date->setDate(2015,2,27); echo $date->format('d-m-Y');
based on 0OUnM
Output for 7.0.20, 7.1.5 - 7.2.0
27-02-2015
Output for 5.3.18 - 7.0.6, 7.1.0
01-02-2015