3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = new DateTime("31.12.2018"); $y = new DateTime(); $y->setDate(date("Y"), date("m"), $x->format("d")); echo $y->format("d.m.Y") . "\n"; $y->modify("+1 month"); echo $y->format("d.m.Y");
Output for 7.3.0rc3
31.10.2018 01.12.2018