3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime('2017-12-31 23:59:59.999999'); echo $date->format('Y-m-d H:i:s.u'); echo "\n"; echo $date->modify('+9000001 microsecond')->format('Y-m-d H:i:s.u');
Output for 7.3.12 - 7.3.26, 7.4.0 - 7.4.16, 8.0.0 - 8.0.3
2017-12-31 23:59:59.999999 2018-01-01 00:00:09.000000
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.11
2017-12-31 23:59:59.999999 2018-01-01 00:00:01.8000000