3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new DateTime("30.3.2018"); $y = new DateTime(); $y->setDate(date("Y"), date("m"), $x->format("d")); $y->modify("+1 month"); echo $y->format("d.m.Y");

preferences:
28.39 ms | 402 KiB | 5 Q