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'); } $microtime = microtime(true); print_r(sprintf('%.f', $microtime)); $test = GetFormattedMicroTime(); print_r($test);
Output for 7.1.0
1403538577.0040142014-06-23T15:49:37.004040
Output for 7.0.14
1403538577.0038802014-06-23T15:49:37.003906
Output for 7.0.6
1462245388.4263102016-05-03T03:16:28.426335
Output for 7.0.5
1459614238.5033012016-04-02T16:23:58.503319
Output for 7.0.4
1457579761.6913902016-03-10T03:16:01.691408
Output for 7.0.3
1458272166.1832652016-03-18T03:36:06.183281
Output for 7.0.2
1458569045.8487602016-03-21T14:04:05.848776
Output for 7.0.1
1458744076.3336722016-03-23T14:41:16.333690
Output for 7.0.0
1459009845.1512182016-03-26T16:30:45.151244
Output for hhvm-3.12.0
1457691738.4700322016-03-11T10:22:18.470079
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
1403538577.0045982014-06-23T15:49:37.004638
Output for 5.6.21
1462141224.8622062016-05-01T22:20:24.862228
Output for 5.6.20
1460201920.7514552016-04-09T11:38:40.751485
Output for 5.6.19
1457319563.7721372016-03-07T02:59:23.772166
Output for 5.6.18
1457972197.6796192016-03-14T16:16:37.679651
Output for 5.6.17
1458374437.1075832016-03-19T08:00:37.107604
Output for 5.6.16
1459099011.7065772016-03-27T17:16:51.706613
Output for 5.6.15
1459188600.9455622016-03-28T18:10:00.945590
Output for 5.6.14
1459543285.6434992016-04-01T20:41:25.643530
Output for 5.6.13
1460680921.3267232016-04-15T00:42:01.326750
Output for 5.6.12
1461074405.7083342016-04-19T14:00:05.708352
Output for 5.6.11
1461359199.1119582016-04-22T21:06:39.111983
Output for 5.6.10
1461537923.9092612016-04-24T22:45:23.909288
Output for 5.6.9
1461729471.3168952016-04-27T03:57:51.316923
Output for 5.6.8
1461930370.9108822016-04-29T11:46:10.910912
Output for 5.6.7
1464136994.0828112016-05-25T00:43:14.082840
Output for 5.5.35
1463882887.2161822016-05-22T02:08:07.216197
Output for 5.5.34
1460309796.0873442016-04-10T17:36:36.087373
Output for 5.5.33
1457446332.5508722016-03-08T14:12:12.550897
Output for 5.5.32
1458158436.9653742016-03-16T20:00:36.965399
Output for 5.5.31
1458471113.8640642016-03-20T10:51:53.864095
Output for 5.5.30
1459455076.9713732016-03-31T20:11:16.971403
Output for 5.5.29
1460818006.5652312016-04-16T14:46:46.565260
Output for 5.5.28
1461172285.0985212016-04-20T17:11:25.098541
Output for 5.5.27
1461267132.9254832016-04-21T19:32:12.925514
Output for 5.5.26
1461633644.0682272016-04-26T01:20:44.068256
Output for 5.5.25
1461827859.2152992016-04-28T07:17:39.215322
Output for 5.5.24
1464012683.8450302016-05-23T14:11:23.845057
Output for 5.4.45
1442024464.5090822015-09-12T02:21:04.509200
Output for 5.4.44
1442024462.1363942015-09-12T02:21:02.136537
Output for 5.4.43
1442024459.1829192015-09-12T02:20:59.183046
Output for 5.4.42
1436375360.0424072015-07-08T17:09:20.042494
Output for 5.4.41
1432616525.2945542015-05-26T05:02:05.294681
Output for 5.4.40
1430550553.1369782015-05-02T07:09:13.137098
Output for 5.4.39
1430550552.3627652015-05-02T07:09:12.362900
Output for 5.4.38
1425162246.2324052015-02-28T22:24:06.232522
Output for 5.4.37
1423202993.4468142015-02-06T06:09:53.446856
Output for 5.4.36
1423202993.1299052015-02-06T06:09:53.129976
Output for 5.4.35
1416118489.6620702014-11-16T06:14:49.662148
Output for 5.4.34
1416118489.2646862014-11-16T06:14:49.264741
Output for 5.4.32
1409804154.8809472014-09-04T04:15:54.880983
Output for 5.4.31
1409804154.1574922014-09-04T04:15:54.157555
Output for 5.4.30
1409804152.2808982014-09-04T04:15:52.281048
Output for 5.4.29
1403538581.0652522014-06-23T15:49:41.065326
Output for 5.4.28
1403538581.1176672014-06-23T15:49:41.117746
Output for 5.4.27
1403538581.1723642014-06-23T15:49:41.172446
Output for 5.4.26
1403538581.2207652014-06-23T15:49:41.220832
Output for 5.4.25
1403538581.2725002014-06-23T15:49:41.272602
Output for 5.4.24
1403538581.3198382014-06-23T15:49:41.319913
Output for 5.4.23
1403538581.3770952014-06-23T15:49:41.377134
Output for 5.4.22
1403538581.4235492014-06-23T15:49:41.423620
Output for 5.4.21
1403538581.4691972014-06-23T15:49:41.469260
Output for 5.4.20
1403538581.5193592014-06-23T15:49:41.519443
Output for 5.4.19
1403538581.5659832014-06-23T15:49:41.566079
Output for 5.4.18
1403538581.6144512014-06-23T15:49:41.614519
Output for 5.4.17
1403538581.6669032014-06-23T15:49:41.666987
Output for 5.4.16
1403538581.7361562014-06-23T15:49:41.736258
Output for 5.4.15
1403538581.7890902014-06-23T15:49:41.789152
Output for 5.4.14
1403538581.8436092014-06-23T15:49:41.843689
Output for 5.4.13
1403538581.9002932014-06-23T15:49:41.900373
Output for 5.4.12
1403538581.9578912014-06-23T15:49:41.957960
Output for 5.4.11
1403538582.0105532014-06-23T15:49:42.010631
Output for 5.4.10
1403538582.0660302014-06-23T15:49:42.066138
Output for 5.4.9
1403538582.1399152014-06-23T15:49:42.139964
Output for 5.4.8
1403538582.2047962014-06-23T15:49:42.204875
Output for 5.4.7
1403538582.2724732014-06-23T15:49:42.272546
Output for 5.4.6
1403538582.3336282014-06-23T15:49:42.333761
Output for 5.4.5
1403538582.4223142014-06-23T15:49:42.422392
Output for 5.4.4
1403538582.5239872014-06-23T15:49:42.530537
Output for 5.4.3
1403538582.6095982014-06-23T15:49:42.609678
Output for 5.4.2
1403538582.6942402014-06-23T15:49:42.694322
Output for 5.4.1
1403538582.7502322014-06-23T15:49:42.750310
Output for 5.4.0
1403538582.7959132014-06-23T15:49:42.795984
Output for 5.3.29
1409804152.6107532014-09-04T04:15:52.610788
Output for 5.3.28
1403538582.8453122014-06-23T15:49:42.845382
Output for 5.3.27
1403538582.8967902014-06-23T15:49:42.896871
Output for 5.3.26
1403538582.9874722014-06-23T15:49:42.987502
Output for 5.3.25
1403538583.0377162014-06-23T15:49:43.037804
Output for 5.3.24
1403538583.1071962014-06-23T15:49:43.107265
Output for 5.3.23
1403538583.1592712014-06-23T15:49:43.159350
Output for 5.3.22
1403538583.2089792014-06-23T15:49:43.209068
Output for 5.3.21
1403538583.2671092014-06-23T15:49:43.267146
Output for 5.3.20
1403538583.3294092014-06-23T15:49:43.329489
Output for 5.3.19
1403538583.3972732014-06-23T15:49:43.397355
Output for 5.3.18
1403538583.4706442014-06-23T15:49:43.470730
Output for 5.3.17
1403538583.5864032014-06-23T15:49:43.586451
Output for 5.3.16
1403538583.6593202014-06-23T15:49:43.659419
Output for 5.3.15
1403538583.7440272014-06-23T15:49:43.744141
Output for 5.3.14
1403538583.8061822014-06-23T15:49:43.806216
Output for 5.3.13
1403538583.8725582014-06-23T15:49:43.872596
Output for 5.3.12
1403538583.9370402014-06-23T15:49:43.937137
Output for 5.3.11
1403538584.0265662014-06-23T15:49:44.026636
Output for 5.3.10
1403538584.0774032014-06-23T15:49:44.077470
Output for 5.3.9
1403538584.1234732014-06-23T15:49:44.123547
Output for 5.3.8
1403538584.1736242014-06-23T15:49:44.173703
Output for 5.3.7
1403538584.2402602014-06-23T15:49:44.240334
Output for 5.3.6
1403538584.2923402014-06-23T15:49:44.292403
Output for 5.3.5
1403538584.3407612014-06-23T15:49:44.340831
Output for 5.3.4
1403538584.4008172014-06-23T15:49:44.400881
Output for 5.3.3
1403538584.4475642014-06-23T15:49:44.447643
Output for 5.3.2
1403538584.4948912014-06-23T15:49:44.494958
Output for 5.3.1
1403538584.5474292014-06-23T15:49:44.547458
Output for 5.3.0
1403538584.601642 Fatal error: Call to a member function format() on a non-object in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.17
1403538584.656939 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.16
1403538584.697289 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.15
1403538584.736949 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.14
1403538584.788284 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.13
1403538584.834417 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.12
1403538584.871879 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.11
1403538584.922566 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.10
1403538584.975302 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.9
1403538585.015794 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.8
1403538585.056624 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.7
1403538585.097286 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.6
1403538585.143937 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.5
1403538585.200297 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.4
1403538585.239593 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.3
1403538585.280112 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.2
1403538585.322198 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.1
1403538585.368277 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.2.0
1403538585.415457 Fatal error: Call to undefined method DateTime::createfromformat() in /in/nniAu on line 5
Process exited with code 255.
Output for 5.1.6
1403538585.460914 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.1.5
1403538585.502738 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.1.4
1403538585.540142 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.1.3
1403538585.578315 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.1.2
1403538585.625020 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.1.1
1403538585.670812 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.1.0
1403538585.724358 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.0.5
1403538585.756031 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.0.4
1403538585.784041 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.0.3
1403538585.826777 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.0.2
1403538585.873034 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.0.1
1403538585.903978 Fatal error: Class 'DateTime' not found in /in/nniAu on line 5
Process exited with code 255.
Output for 5.0.0
1403538585.946457 Fatal error: Class 'DateTime' not found in /in/nniAu 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/nniAu 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/nniAu on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/nniAu on line 5
Process exited with code 255.