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"); $y->modify("+1 month"); echo $y->format("d.m.Y");
Output for 7.3.0rc3
Fatal error: Uncaught Error: Call to undefined function format() in /in/FcAW2:6 Stack trace: #0 {main} thrown in /in/FcAW2 on line 6
Process exited with code 255.