3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function GetFormattedMicroTime($timestamp = false) { if(!$timestamp) $timestamp = microtime(true); return DateTime::createFromFormat('U.u',sprintf('%.f', $timestamp))->format('Y-m-d\TH:i:s.u'); } $test = GetFormattedMicroTime(microtime(true)); print_r($test);
Output for 7.1.0
2014-06-23T15:42:21.004010
Output for 7.0.14
2014-06-23T15:42:21.003757
Output for 7.0.6
2016-05-03T01:53:21.472711
Output for 7.0.5
2016-04-02T15:05:28.181442
Output for 7.0.4
2016-03-10T01:47:27.039625
Output for 7.0.3
2016-03-18T02:01:24.042933
Output for 7.0.2
2016-03-21T12:34:12.019720
Output for 7.0.1
2016-03-23T12:47:04.362451
Output for 7.0.0
2016-03-26T15:08:23.665880
Output for hhvm-3.12.0
2016-03-27T10:07:55.959862
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
2014-06-23T15:42:21.004541
Output for 5.6.21
2016-05-01T20:57:15.635060
Output for 5.6.20
2016-04-09T10:20:24.913441
Output for 5.6.19
2016-03-07T00:32:04.092747
Output for 5.6.18
2016-03-14T12:36:53.773881
Output for 5.6.17
2016-03-19T06:30:46.309072
Output for 5.6.16
2016-03-27T15:54:49.531109
Output for 5.6.15
2016-03-28T16:47:14.290653
Output for 5.6.14
2016-04-01T19:22:21.600985
Output for 5.6.13
2016-04-14T23:19:36.765241
Output for 5.6.12
2016-04-19T12:26:15.485006
Output for 5.6.11
2016-04-22T19:42:01.479862
Output for 5.6.10
2016-04-24T21:19:51.583281
Output for 5.6.9
2016-04-27T02:32:30.155876
Output for 5.6.8
2016-04-29T10:16:37.460289
Output for 5.6.7
2016-05-24T22:01:45.778423
Output for 5.5.35
2016-05-22T00:23:57.923885
Output for 5.5.34
2016-04-10T16:18:02.672079
Output for 5.5.33
2016-03-08T12:42:04.885677
Output for 5.5.32
2016-03-16T18:25:28.052009
Output for 5.5.31
2016-03-20T09:22:19.331394
Output for 5.5.30
2016-03-31T18:48:05.689133
Output for 5.5.29
2016-04-16T13:21:43.766001
Output for 5.5.28
2016-04-20T15:43:02.093536
Output for 5.5.27
2016-04-21T18:10:09.669798
Output for 5.5.26
2016-04-25T23:49:41.150317
Output for 5.5.25
2016-04-28T05:50:07.010939
Output for 5.5.24
2016-04-30T13:15:24.391511
Output for 5.4.45
2015-09-20T22:21:32.406510
Output for 5.4.44
2015-08-11T22:07:20.213720
Output for 5.4.43
2015-08-11T22:07:15.632566
Output for 5.4.42
2015-07-08T17:09:56.021182
Output for 5.4.41
2015-05-26T05:02:37.369815
Output for 5.4.40
2015-05-02T07:10:25.929314
Output for 5.4.39
2015-05-02T07:10:25.205040
Output for 5.4.38
2015-02-28T22:24:55.466577
Output for 5.4.37
2015-02-06T06:11:08.955105
Output for 5.4.36
2015-02-06T06:11:08.650381
Output for 5.4.35
2014-11-16T06:16:51.485788
Output for 5.4.34
2014-11-16T06:16:51.085180
Output for 5.4.32
2014-09-04T04:17:33.950551
Output for 5.4.31
2014-09-04T04:17:33.298674
Output for 5.4.30
2014-09-04T04:17:32.141714
Output for 5.4.29
2014-06-23T15:42:30.216886
Output for 5.4.28
2014-06-23T15:42:30.289558
Output for 5.4.27
2014-06-23T15:42:30.354618
Output for 5.4.26
2014-06-23T15:42:30.474506
Output for 5.4.25
2014-06-23T15:42:30.537587
Output for 5.4.24
2014-06-23T15:42:30.662228
Output for 5.4.23
2014-06-23T15:42:30.733773
Output for 5.4.22
2014-06-23T15:42:30.809988
Output for 5.4.21
2014-06-23T15:42:30.868073
Output for 5.4.20
2014-06-23T15:42:30.927338
Output for 5.4.19
2014-06-23T15:42:31.003122
Output for 5.4.18
2014-06-23T15:42:31.067714
Output for 5.4.17
2014-06-23T15:42:31.209143
Output for 5.4.16
2014-06-23T15:42:31.268765
Output for 5.4.15
2014-06-23T15:42:31.326457
Output for 5.4.14
2014-06-23T15:42:31.388211
Output for 5.4.13
2014-06-23T15:42:31.443149
Output for 5.4.12
2014-06-23T15:42:31.494442
Output for 5.4.11
2014-06-23T15:42:31.574185
Output for 5.4.10
2014-06-23T15:42:31.621135
Output for 5.4.9
2014-06-23T15:42:31.678121
Output for 5.4.8
2014-06-23T15:42:31.792477
Output for 5.4.7
2014-06-23T15:42:31.848832
Output for 5.4.6
2014-06-23T15:42:31.901793
Output for 5.4.5
2014-06-23T15:42:31.969021
Output for 5.4.4
2014-06-23T15:42:32.034783
Output for 5.4.3
2014-06-23T15:42:32.143890
Output for 5.4.2
2014-06-23T15:42:32.204299
Output for 5.4.1
2014-06-23T15:42:32.266697
Output for 5.4.0
2014-06-23T15:42:32.326070
Output for 5.3.29
2014-09-04T04:17:32.340023
Output for 5.3.28
2014-06-23T15:42:32.443971
Output for 5.3.27
2014-06-23T15:42:32.497179
Output for 5.3.26
2014-06-23T15:42:32.611959
Output for 5.3.25
2014-06-23T15:42:32.669232
Output for 5.3.24
2014-06-23T15:42:32.720357
Output for 5.3.23
2014-06-23T15:42:32.790677
Output for 5.3.22
2014-06-23T15:42:32.912755
Output for 5.3.21
2014-06-23T15:42:32.967314
Output for 5.3.20
2014-06-23T15:42:33.110028
Output for 5.3.19
2014-06-23T15:42:33.183435
Output for 5.3.18
2014-06-23T15:42:33.303906
Output for 5.3.17
2014-06-23T15:42:33.357036
Output for 5.3.16
2014-06-23T15:42:33.406591
Output for 5.3.15
2014-06-23T15:42:33.475339
Output for 5.3.14
2014-06-23T15:42:33.583991
Output for 5.3.13
2014-06-23T15:42:33.662223
Output for 5.3.12
2014-06-23T15:42:33.792387
Output for 5.3.11
2014-06-23T15:42:33.932345
Output for 5.3.10
2014-06-23T15:42:33.985229
Output for 5.3.9
2014-06-23T15:42:34.063767
Output for 5.3.8
2014-06-23T15:42:34.119026
Output for 5.3.7
2014-06-23T15:42:34.211031
Output for 5.3.6
2014-06-23T15:42:34.277814
Output for 5.3.5
2014-06-23T15:42:34.388344
Output for 5.3.4
2014-06-23T15:42:34.471437
Output for 5.3.3
2014-06-23T15:42:34.519837
Output for 5.3.2
2014-06-23T15:42:34.570594
Output for 5.3.1
2014-06-23T15:42:34.620575
Output for 5.3.0
Fatal error: Call to a member function format() on a non-object in /in/b5jKM on line 5
Process exited with code 255.
Output for 5.2.10 - 5.2.17
Fatal error: Call to undefined method DateTime::createFromFormat() in /in/b5jKM on line 5
Process exited with code 255.
Output for 5.2.0 - 5.2.9
Fatal error: Call to undefined method DateTime::createfromformat() in /in/b5jKM on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/b5jKM on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/b5jKM on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/b5jKM on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/b5jKM on line 5
Process exited with code 255.