3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date=date_create("d-m-Y h:i:s"); date_modify($date,"+15 days"); echo date_format($date,"Y-m-d"); ?>
Output for 5.5.0 - 7.1.0
Warning: date_modify() expects parameter 1 to be DateTime, boolean given in /in/Y59I1 on line 4 Warning: date_format() expects parameter 1 to be DateTimeInterface, boolean given in /in/Y59I1 on line 5
Output for 5.2.6 - 5.4.45
Warning: date_modify() expects parameter 1 to be DateTime, boolean given in /in/Y59I1 on line 4 Warning: date_format() expects parameter 1 to be DateTime, boolean given in /in/Y59I1 on line 5
Output for 5.2.0 - 5.2.5
Warning: date_create(): Failed to parse time string (d-m-Y h:i:s) at position 1 (-): Unexpected character in /in/Y59I1 on line 3 2014-02-07
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function date_create() in /in/Y59I1 on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_create() in /in/Y59I1 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: date_create() in /in/Y59I1 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_create() in /in/Y59I1 on line 3