3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new \DateTime('2015-05-24 00:00:00'); $time = new \DateTime('0000-00-00 21:00:00'); $pickUpDateTime = new \DateTime(); $pickUpDateTime->setDate($date->format('Y'), $date->format('m'), $date->format('d')); $pickUpDateTime->setTime($time->format('H'), $time->format('i'), $time->format('s')); echo $pickUpDateTime;
based on RINQ4
Output for 7.1.0 - 7.2.0
Recoverable fatal error: Object of class DateTime could not be converted to string in /in/ggvPh on line 10
Process exited with code 255.
Output for 5.3.21 - 7.0.20
Catchable fatal error: Object of class DateTime could not be converted to string in /in/ggvPh on line 10
Process exited with code 255.