3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $t = '1540462440423'; $test = new DateTimeImmutable($t); var_dump($test);
based on 9B3e0
Output for 7.0.28 - 7.3.0rc3
Fatal error: Uncaught Exception: DateTimeImmutable::__construct(): Failed to parse time string (1540462440423) at position 6 (2): Double time specification in /in/56jVF:5 Stack trace: #0 /in/56jVF(5): DateTimeImmutable->__construct('1540462440423') #1 {main} thrown in /in/56jVF on line 5
Process exited with code 255.
Output for 5.6.38
Fatal error: Uncaught exception 'Exception' with message 'DateTimeImmutable::__construct(): Failed to parse time string (1540462440423) at position 6 (2): Double time specification' in /in/56jVF:5 Stack trace: #0 /in/56jVF(5): DateTimeImmutable->__construct('1540462440423') #1 {main} thrown in /in/56jVF on line 5
Process exited with code 255.