3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Oslo'); $datetime = new DateTime(); echo $datetime->format('Y-m-d H:i:s.u')."\n"; $datetime = new DateTime('2016-08-07T11:59:12.345'); echo $datetime->format('Y-m-d H:i:s.u')."\n";
Output for 8.1.13
2016-08-07 11:59:51.003363 2016-08-07 11:59:12.345000
Output for 8.1.12
2016-08-07 11:59:51.003997 2016-08-07 11:59:12.345000
Output for 8.1.11
2016-08-07 11:59:51.003621 2016-08-07 11:59:12.345000
Output for 8.1.10
2016-08-07 11:59:51.003561 2016-08-07 11:59:12.345000
Output for 8.1.9
2016-08-07 11:59:51.003736 2016-08-07 11:59:12.345000
Output for 8.1.8
2016-08-07 11:59:51.003522 2016-08-07 11:59:12.345000
Output for 8.1.7
2016-08-07 11:59:51.003539 2016-08-07 11:59:12.345000
Output for 8.0.20, 8.1.6
2016-08-07 11:59:51.003684 2016-08-07 11:59:12.345000
Output for 8.1.5
2016-08-07 11:59:51.003690 2016-08-07 11:59:12.345000
Output for 8.1.4
2016-08-07 11:59:51.003795 2016-08-07 11:59:12.345000
Output for 8.1.3
2016-08-07 11:59:51.003608 2016-08-07 11:59:12.345000
Output for 8.1.2
2016-08-07 11:59:51.004377 2016-08-07 11:59:12.345000
Output for 8.1.1
2016-08-07 11:59:51.004097 2016-08-07 11:59:12.345000
Output for 8.1.0
2016-08-07 11:59:51.003827 2016-08-07 11:59:12.345000
Output for 8.0.26
2016-08-07 11:59:51.003397 2016-08-07 11:59:12.345000
Output for 8.0.25
2016-08-07 11:59:51.003484 2016-08-07 11:59:12.345000
Output for 8.0.24
2016-08-07 11:59:51.003267 2016-08-07 11:59:12.345000
Output for 8.0.23
2016-08-07 11:59:51.003462 2016-08-07 11:59:12.345000
Output for 8.0.22
2016-08-07 11:59:51.003344 2016-08-07 11:59:12.345000
Output for 8.0.21
2016-08-07 11:59:51.003476 2016-08-07 11:59:12.345000
Output for 8.0.19
2016-08-07 11:59:51.003650 2016-08-07 11:59:12.345000
Output for 8.0.18
2016-08-07 11:59:51.003717 2016-08-07 11:59:12.345000
Output for 8.0.17
2016-08-07 11:59:51.003686 2016-08-07 11:59:12.345000
Output for 8.0.16
2016-08-07 11:59:51.003343 2016-08-07 11:59:12.345000
Output for 8.0.15
2016-08-07 11:59:51.005899 2016-08-07 11:59:12.345000
Output for 8.0.14
2016-08-07 11:59:51.003601 2016-08-07 11:59:12.345000
Output for 8.0.13
2016-08-07 11:59:51.005080 2016-08-07 11:59:12.345000
Output for 8.0.12
2016-08-07 11:59:51.003877 2016-08-07 11:59:12.345000
Output for 8.0.11
2016-08-07 11:59:51.003626 2016-08-07 11:59:12.345000
Output for 8.0.10
2016-08-07 11:59:51.003602 2016-08-07 11:59:12.345000
Output for 8.0.9
2016-08-07 11:59:51.003772 2016-08-07 11:59:12.345000
Output for 8.0.8
2016-08-07 11:59:51.007970 2016-08-07 11:59:12.345000
Output for 8.0.7
2016-08-07 11:59:51.003851 2016-08-07 11:59:12.345000
Output for 8.0.6
2016-08-07 11:59:51.003814 2016-08-07 11:59:12.345000
Output for 8.0.5
2016-08-07 11:59:51.003521 2016-08-07 11:59:12.345000
Output for 8.0.3
2016-08-07 11:59:51.012701 2016-08-07 11:59:12.345000
Output for 8.0.2
2016-08-07 11:59:51.008754 2016-08-07 11:59:12.345000
Output for 8.0.1
2016-08-07 11:59:51.003740 2016-08-07 11:59:12.345000
Output for 8.0.0
2016-08-07 11:59:51.008482 2016-08-07 11:59:12.345000
Output for 7.4.33
2016-08-07 11:59:51.001974 2016-08-07 11:59:12.345000
Output for 7.4.32
2016-08-07 11:59:51.003208 2016-08-07 11:59:12.345000
Output for 7.4.30
2016-08-07 11:59:51.002817 2016-08-07 11:59:12.345000
Output for 7.4.29
2016-08-07 11:59:51.003250 2016-08-07 11:59:12.345000
Output for 7.4.28
2016-08-07 11:59:51.004245 2016-08-07 11:59:12.345000
Output for 7.4.27
2016-08-07 11:59:51.003103 2016-08-07 11:59:12.345000
Output for 7.4.26
2016-08-07 11:59:51.003390 2016-08-07 11:59:12.345000
Output for 7.4.25
2016-08-07 11:59:51.003196 2016-08-07 11:59:12.345000
Output for 7.4.24
2016-08-07 11:59:51.003571 2016-08-07 11:59:12.345000
Output for 7.4.23
2016-08-07 11:59:51.003472 2016-08-07 11:59:12.345000
Output for 7.4.22
2016-08-07 11:59:51.009304 2016-08-07 11:59:12.345000
Output for 7.4.21
2016-08-07 11:59:51.008527 2016-08-07 11:59:12.345000
Output for 7.4.20
2016-08-07 11:59:51.003635 2016-08-07 11:59:12.345000
Output for 7.4.16
2016-08-07 11:59:51.007833 2016-08-07 11:59:12.345000
Output for 7.4.15
2016-08-07 11:59:51.008636 2016-08-07 11:59:12.345000
Output for 7.4.14
2016-08-07 11:59:51.009581 2016-08-07 11:59:12.345000
Output for 7.4.13
2016-08-07 11:59:51.009102 2016-08-07 11:59:12.345000
Output for 7.4.12
2016-08-07 11:59:51.009204 2016-08-07 11:59:12.345000
Output for 7.4.11
2016-08-07 11:59:51.012369 2016-08-07 11:59:12.345000
Output for 7.4.10
2016-08-07 11:59:51.008293 2016-08-07 11:59:12.345000
Output for 7.4.9
2016-08-07 11:59:51.009583 2016-08-07 11:59:12.345000
Output for 7.4.8
2016-08-07 11:59:51.008484 2016-08-07 11:59:12.345000
Output for 7.4.7
2016-08-07 11:59:51.009355 2016-08-07 11:59:12.345000
Output for 7.4.6
2016-08-07 11:59:51.000307 2016-08-07 11:59:12.345000
Output for 7.4.5
2016-08-07 11:59:51.003293 2016-08-07 11:59:12.345000
Output for 7.4.4
2016-08-07 11:59:51.008128 2016-08-07 11:59:12.345000
Output for 7.4.3
2016-08-07 11:59:51.008287 2016-08-07 11:59:12.345000
Output for 7.4.0
2016-08-07 11:59:51.000222 2016-08-07 11:59:12.345000
Output for 7.3.33
2016-08-07 11:59:51.002388 2016-08-07 11:59:12.345000
Output for 7.3.32
2016-08-07 11:59:51.003117 2016-08-07 11:59:12.345000
Output for 7.3.31
2016-08-07 11:59:51.003285 2016-08-07 11:59:12.345000
Output for 7.3.30
2016-08-07 11:59:51.003234 2016-08-07 11:59:12.345000
Output for 7.3.29
2016-08-07 11:59:51.007474 2016-08-07 11:59:12.345000
Output for 7.3.28
2016-08-07 11:59:51.007663 2016-08-07 11:59:12.345000
Output for 7.3.27
2016-08-07 11:59:51.008542 2016-08-07 11:59:12.345000
Output for 7.3.26
2016-08-07 11:59:51.012505 2016-08-07 11:59:12.345000
Output for 7.3.25
2016-08-07 11:59:51.011382 2016-08-07 11:59:12.345000
Output for 7.3.24
2016-08-07 11:59:51.009203 2016-08-07 11:59:12.345000
Output for 7.3.23
2016-08-07 11:59:51.008361 2016-08-07 11:59:12.345000
Output for 7.3.21
2016-08-07 11:59:51.008291 2016-08-07 11:59:12.345000
Output for 7.3.20
2016-08-07 11:59:51.008310 2016-08-07 11:59:12.345000
Output for 7.3.19
2016-08-07 11:59:51.008547 2016-08-07 11:59:12.345000
Output for 7.3.18
2016-08-07 11:59:51.005680 2016-08-07 11:59:12.345000
Output for 7.3.17
2016-08-07 11:59:51.008934 2016-08-07 11:59:12.345000
Output for 7.3.16
2016-08-07 11:59:51.011445 2016-08-07 11:59:12.345000
Output for 7.3.12
2016-08-07 11:59:51.000223 2016-08-07 11:59:12.345000
Output for 7.3.11
2016-08-07 11:59:51.000175 2016-08-07 11:59:12.345000
Output for 7.3.10
2016-08-07 11:59:51.000173 2016-08-07 11:59:12.345000
Output for 7.3.9
2016-08-07 11:59:51.000256 2016-08-07 11:59:12.345000
Output for 7.3.8
2016-08-07 11:59:51.000261 2016-08-07 11:59:12.345000
Output for 7.3.7
2016-08-07 11:59:51.000182 2016-08-07 11:59:12.345000
Output for 7.3.6
2016-08-07 11:59:51.000144 2016-08-07 11:59:12.345000
Output for 7.3.5
2016-08-07 11:59:51.000186 2016-08-07 11:59:12.345000
Output for 7.3.4
2016-08-07 11:59:51.000149 2016-08-07 11:59:12.345000
Output for 7.3.3
2016-08-07 11:59:51.000277 2016-08-07 11:59:12.345000
Output for 7.3.2
2016-08-07 11:59:51.000128 2016-08-07 11:59:12.345000
Output for 7.3.1
2016-08-07 11:59:51.000192 2016-08-07 11:59:12.345000
Output for 7.3.0
2016-08-07 11:59:51.000109 2016-08-07 11:59:12.345000
Output for 7.2.33
2016-08-07 11:59:51.009746 2016-08-07 11:59:12.345000
Output for 7.2.32
2016-08-07 11:59:51.011837 2016-08-07 11:59:12.345000
Output for 7.2.31
2016-08-07 11:59:51.008211 2016-08-07 11:59:12.345000
Output for 7.2.30
2016-08-07 11:59:51.008297 2016-08-07 11:59:12.345000
Output for 7.2.29
2016-08-07 11:59:51.008392 2016-08-07 11:59:12.345000
Output for 7.2.25
2016-08-07 11:59:51.000220 2016-08-07 11:59:12.345000
Output for 7.2.24
2016-08-07 11:59:51.000167 2016-08-07 11:59:12.345000
Output for 7.2.23
2016-08-07 11:59:51.000150 2016-08-07 11:59:12.345000
Output for 7.2.22
2016-08-07 11:59:51.000153 2016-08-07 11:59:12.345000
Output for 7.2.21
2016-08-07 11:59:51.000177 2016-08-07 11:59:12.345000
Output for 7.2.20
2016-08-07 11:59:51.000193 2016-08-07 11:59:12.345000
Output for 7.2.19
2016-08-07 11:59:51.000168 2016-08-07 11:59:12.345000
Output for 7.2.18
2016-08-07 11:59:51.000174 2016-08-07 11:59:12.345000
Output for 7.2.17
2016-08-07 11:59:51.000199 2016-08-07 11:59:12.345000
Output for 7.2.6
2016-08-07 11:59:51.002272 2016-08-07 11:59:12.345000
Output for 7.2.0
2016-08-07 11:59:51.003645 2016-08-07 11:59:12.345000
Output for 7.1.33
2016-08-07 11:59:51.000189 2016-08-07 11:59:12.345000
Output for 7.1.32
2016-08-07 11:59:51.000111 2016-08-07 11:59:12.345000
Output for 7.1.31
2016-08-07 11:59:51.000151 2016-08-07 11:59:12.345000
Output for 7.1.30
2016-08-07 11:59:51.000191 2016-08-07 11:59:12.345000
Output for 7.1.29
2016-08-07 11:59:51.000170 2016-08-07 11:59:12.345000
Output for 7.1.28
2016-08-07 11:59:51.000187 2016-08-07 11:59:12.345000
Output for 7.1.26 - 7.1.27
2016-08-07 11:59:51.000119 2016-08-07 11:59:12.345000
Output for 7.1.20
2016-08-07 11:59:51.002860 2016-08-07 11:59:12.345000
Output for 7.1.10
2016-08-07 11:59:51.003930 2016-08-07 11:59:12.345000
Output for 7.1.7
2016-08-07 11:59:51.005203 2016-08-07 11:59:12.345000
Output for 7.1.6
2016-08-07 11:59:51.005524 2016-08-07 11:59:12.345000
Output for 7.1.5
2016-08-07 11:59:51.012746 2016-08-07 11:59:12.345000
Output for 7.1.0
2016-08-07 11:59:51.003989 2016-08-07 11:59:12.345000
Output for 5.6.0 - 5.6.24, 7.0.0 - 7.0.20
2016-08-07 11:59:51.000000 2016-08-07 11:59:12.345000

preferences:
99.56 ms | 591 KiB | 5 Q