3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = \DateTime::createFromFormat("m-d-y", '07-03-17'); if ($date) { $date->setTime(0, 0); } echo $date;
based on MMX21
Output for 7.1.0 - 7.3.0rc3
Recoverable fatal error: Object of class DateTime could not be converted to string in /in/2QK2i on line 7
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.20
Catchable fatal error: Object of class DateTime could not be converted to string in /in/2QK2i on line 7
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Object of class DateTime could not be converted to string in /in/2QK2i:7 Stack trace: #0 {main}
Process exited with code 255.