3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime(); $dt->createFromFormat('s.u', '3.400000'); // I replaced 3.4 by microtime(true), this is just to give an example var_dump($dt); var_dump($dt->format('u'));
based on ndl5h
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:30.003699" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "003699"
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:30.004294" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "004294"
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:30.005621" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "005621"
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:30.012369" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "012369"
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:30.006749" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "006749"
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:30.014327" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "014327"
Output for 5.6.28, 7.0.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 7.0.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-03 18:46:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 7.0.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-03 07:11:15.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 7.0.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 18:58:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 7.0.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 20:11:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 7.0.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 02:18:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 7.0.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-24 05:54:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 7.0.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 07:49:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 13:55:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 06:10:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 03:11:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 11:55:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-19 23:33:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 08:37:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-29 09:27:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-02 11:17:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 15:45:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 06:13:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 12:36:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 14:38:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 19:48:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.6.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 04:40:18.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-22 21:39:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-11 08:22:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 05:56:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 15:50:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 02:36:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 11:21:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-17 06:06:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 09:27:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 11:13:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 17:21:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 00:17:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.5.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 06:46:20.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.45
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.44
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.43
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.41 - 5.4.42
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.40
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.39
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.38
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.35 - 5.4.37
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.31 - 5.4.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.27 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:46" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.24 - 5.4.26
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:47" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.28, 5.4.21 - 5.4.23
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:48" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.18 - 5.4.20
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:49" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.26 - 5.3.27, 5.4.17
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:50" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.23 - 5.3.25, 5.4.13 - 5.4.16
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:51" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.20 - 5.3.22, 5.4.9 - 5.4.12
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:52" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:45" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.19
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:53" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"