3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time = strtotime('2015-10-28T08:22:20.458Z'); $date = new \DateTime($time); echo $date->format('Y-m-d H:i:s');
based on 9IRhA
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1446020540) at position 8 (4): Unexpected character in /in/vshhe:5 Stack trace: #0 /in/vshhe(5): DateTime->__construct('1446020540') #1 {main} thrown in /in/vshhe on line 5
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1446020540) at position 8 (4): Unexpected character' in /in/vshhe:5 Stack trace: #0 /in/vshhe(5): DateTime->__construct('1446020540') #1 {main} thrown in /in/vshhe on line 5
Process exited with code 255.