3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $temp_date = date('d-m-Y h:i:s'); $current_date = date_create($temp_date); date_modify($temp_date,'+30 minutes'); $modified_date=date_format($date,"Y-m-d h:i:s"); ?>
Output for 5.5.0 - 7.1.0
Warning: date_modify() expects parameter 1 to be DateTime, string given in /in/hSOKK on line 5 Notice: Undefined variable: date in /in/hSOKK on line 6 Warning: date_format() expects parameter 1 to be DateTimeInterface, null given in /in/hSOKK on line 6
Output for 5.2.0 - 5.4.45
Warning: date_modify() expects parameter 1 to be DateTime, string given in /in/hSOKK on line 5 Notice: Undefined variable: date in /in/hSOKK on line 6 Warning: date_format() expects parameter 1 to be DateTime, null given in /in/hSOKK on line 6
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function date_create() in /in/hSOKK on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_create() in /in/hSOKK on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: date_create() in /in/hSOKK on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_create() in /in/hSOKK on line 4