3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new DateTime("12.02.2017"); $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");

preferences:
38.94 ms | 402 KiB | 5 Q