3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new \DateTime('2018-10-31'); $date->modify('+60 days'); var_dump($date->format('Y-m-d')); $date2 = new \DateTime('2018-10-31'); $date2->modify('+1 month'); var_dump($date2->format('Y-m-d')); $date2->modify('+1 month'); var_dump($date2->format('Y-m-d'));
based on l3tmX