3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set ( 'America/Chicago' ); echo \DateTime::createFromFormat('Y-m-d H:i T', '2015-10-22 09:23 CDT')->format('c'); echo (new \DateTime('2015-10-22T08:50:39-0500'))->format('Y-m-d H:i T');
based on 7RHbi
Output for 5.4.0 - 7.2.0
2015-10-22T09:23:00-05:002015-10-22 08:50 GMT-0500
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/k3XcJ on line 5
Process exited with code 255.