3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime('@' . '1393426800.999000'); var_dump($dt);
based on PCq7S
Output for 7.1.0 - 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-02-26 15:00:00.999000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" }
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (@1393426800.999000) at position 16 (0): Unexpected character in /in/hQ3mi:3 Stack trace: #0 /in/hQ3mi(3): DateTime->__construct('@1393426800.999...') #1 {main} thrown in /in/hQ3mi on line 3
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@1393426800.999000) at position 16 (0): Unexpected character' in /in/hQ3mi:3 Stack trace: #0 /in/hQ3mi(3): DateTime->__construct('@1393426800.999...') #1 {main} thrown in /in/hQ3mi on line 3
Process exited with code 255.