3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date1 = new DateTime("now"); $date2 = new DateTime("tomorrow"); echo date("Y-m-d H:i:s",$date1); echo date("Y-m-d H:i:s",$date2);
based on QgttV
Output for hhvm-3.10.1 - 3.21.3, 7.0.0 - 7.2.12
Warning: date() expects parameter 2 to be integer, object given in /in/Rs9Wl on line 5 Warning: date() expects parameter 2 to be integer, object given in /in/Rs9Wl on line 6
Output for hhvm-3.22.0
Warning: date() expects parameter 2 to be integer, object given in /in/Rs9Wl on line -1 Warning: date() expects parameter 2 to be integer, object given in /in/Rs9Wl on line -1
Output for 5.5.0 - 5.6.38
Warning: date() expects parameter 2 to be long, object given in /in/Rs9Wl on line 5 Warning: date() expects parameter 2 to be long, object given in /in/Rs9Wl on line 6