3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $t=time(); echo($t); $str='Fri, 20 Nov 2015 17:56:56 -0500'; echo($str); $date = new DateTime( $str ); echo $date->format( 'H:i:s' ); echo($date);
based on SijVL
Output for 7.1.0 - 7.2.0
1448060573Fri, 20 Nov 2015 17:56:56 -050017:56:56 Recoverable fatal error: Object of class DateTime could not be converted to string in /in/KfLYH on line 11
Process exited with code 255.
Output for 5.5.0 - 7.0.20
1448060573Fri, 20 Nov 2015 17:56:56 -050017:56:56 Catchable fatal error: Object of class DateTime could not be converted to string in /in/KfLYH on line 11
Process exited with code 255.