3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime(); $dt->createFromFormat('s.u', '3.4'); // I replaced 3.4 by microtime(true), this is just to give an example var_dump($dt); var_dump($dt->format('u'));
based on hPVdT
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:02.005496" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "005496"
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:02.005188" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "005188"
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:02.002447" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "002447"
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:02.010814" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "010814"
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:02.009950" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "009950"
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:02.003973" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "003973"
Output for 5.6.28, 7.0.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:02.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:50.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:36.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:28.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:35.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:48.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:40.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:25.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:40:21.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:06.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:57.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:46.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:30.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:45.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:42.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:25.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:10.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:12.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:15.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:16.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:18.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:20.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:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.37
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.35 - 5.4.36
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-13 12:18:23.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:24.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:25.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:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.28 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:26" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.25 - 5.4.27
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:27" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.28, 5.4.22 - 5.4.24
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:28" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.4.19 - 5.4.21
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:29" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.27, 5.4.17 - 5.4.18
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:30" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.25 - 5.3.26, 5.4.15 - 5.4.16
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:31" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.24, 5.4.13 - 5.4.14
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:32" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.21 - 5.3.23, 5.4.12
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:33" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.20, 5.4.10 - 5.4.11
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:34" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"
Output for 5.3.19, 5.4.9
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-13 12:18:35" ["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:25" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(6) "000000"