3v4l.org

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