3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $objDateTime = new DateTime('NOW'); echo $objDateTime->format('c'); // ISO8601 formated datetime echo $objDateTime->format(DateTime::ISO8601); // Another way to get an ISO8601
Output for 5.6.28, 7.0.14 - 7.1.0
2013-12-18T04:26:24+01:002013-12-18T04:26:24+0100
Output for 7.0.6
2016-05-03T01:42:57+02:002016-05-03T01:42:57+0200
Output for 7.0.5
2016-04-02T15:00:53+02:002016-04-02T15:00:53+0200
Output for 7.0.4
2016-03-10T00:08:17+01:002016-03-10T00:08:17+0100
Output for 7.0.3
2016-03-18T00:34:57+01:002016-03-18T00:34:57+0100
Output for 7.0.2
2016-03-21T11:12:41+01:002016-03-21T11:12:41+0100
Output for 7.0.1
2016-03-23T11:23:50+01:002016-03-23T11:23:50+0100
Output for 7.0.0
2016-03-26T13:57:16+01:002016-03-26T13:57:16+0100
Output for hhvm-3.12.0
2016-03-30T09:59:57+02:002016-03-30T09:59:57+0200
Output for hhvm-3.10.0
2016-03-29T18:39:21+02:002016-03-29T18:39:21+0200
Output for 5.6.21
2016-05-01T20:46:54+02:002016-05-01T20:46:54+0200
Output for 5.6.20
2016-04-09T10:16:04+02:002016-04-09T10:16:04+0200
Output for 5.6.19
2016-03-06T22:16:32+01:002016-03-06T22:16:32+0100
Output for 5.6.18
2016-03-14T10:03:02+01:002016-03-14T10:03:02+0100
Output for 5.6.17
2016-03-19T05:06:23+01:002016-03-19T05:06:23+0100
Output for 5.6.16
2016-03-27T15:41:49+02:002016-03-27T15:41:49+0200
Output for 5.6.15
2016-03-28T16:36:13+02:002016-03-28T16:36:13+0200
Output for 5.6.14
2016-04-01T19:16:46+02:002016-04-01T19:16:46+0200
Output for 5.6.13
2016-04-14T23:04:12+02:002016-04-14T23:04:12+0200
Output for 5.6.12
2016-04-19T12:11:10+02:002016-04-19T12:11:10+0200
Output for 5.6.11
2016-04-22T19:27:42+02:002016-04-22T19:27:42+0200
Output for 5.6.10
2016-04-24T21:07:22+02:002016-04-24T21:07:22+0200
Output for 5.6.9
2016-04-27T02:14:55+02:002016-04-27T02:14:55+0200
Output for 5.6.8
2016-04-29T09:47:59+02:002016-04-29T09:47:59+0200
Output for 5.6.7
2016-05-24T20:15:20+02:002016-05-24T20:15:20+0200
Output for 5.5.35
2016-05-22T00:02:08+02:002016-05-22T00:02:08+0200
Output for 5.5.34
2016-04-10T16:11:01+02:002016-04-10T16:11:01+0200
Output for 5.5.33
2016-03-08T11:20:05+01:002016-03-08T11:20:05+0100
Output for 5.5.32
2016-03-16T16:54:03+01:002016-03-16T16:54:03+0100
Output for 5.5.31
2016-03-20T07:59:33+01:002016-03-20T07:59:33+0100
Output for 5.5.30
2016-03-31T18:38:50+02:002016-03-31T18:38:50+0200
Output for 5.5.29
2016-04-16T13:09:38+02:002016-04-16T13:09:38+0200
Output for 5.5.28
2016-04-20T15:24:06+02:002016-04-20T15:24:06+0200
Output for 5.5.27
2016-04-21T17:59:12+02:002016-04-21T17:59:12+0200
Output for 5.5.26
2016-04-25T23:24:01+02:002016-04-25T23:24:01+0200
Output for 5.5.25
2016-04-28T05:31:09+02:002016-04-28T05:31:09+0200
Output for 5.5.24
2016-04-30T13:05:56+02:002016-04-30T13:05:56+0200
Output for 5.4.45
2015-11-07T22:44:30+01:002015-11-07T22:44:30+0100
Output for 5.4.44
2015-11-07T22:44:34+01:002015-11-07T22:44:34+0100
Output for 5.4.43
2015-11-07T22:44:38+01:002015-11-07T22:44:38+0100
Output for 5.4.42
2015-11-07T22:44:40+01:002015-11-07T22:44:40+0100
Output for 5.4.41
2015-11-07T22:44:41+01:002015-11-07T22:44:41+0100
Output for 5.4.40
2015-11-07T22:44:44+01:002015-11-07T22:44:44+0100
Output for 5.4.38 - 5.4.39
2015-11-07T22:44:47+01:002015-11-07T22:44:47+0100
Output for 5.4.36 - 5.4.37
2015-11-07T22:44:50+01:002015-11-07T22:44:50+0100
Output for 5.4.35
2015-11-07T22:44:52+01:002015-11-07T22:44:52+0100
Output for 5.4.34
2015-11-07T22:44:53+01:002015-11-07T22:44:53+0100
Output for 5.3.29, 5.4.32
2015-11-07T22:44:56+01:002015-11-07T22:44:56+0100
Output for 5.4.31
2015-11-07T22:44:57+01:002015-11-07T22:44:57+0100
Output for 5.4.29 - 5.4.30
2015-11-07T22:44:58+01:002015-11-07T22:44:58+0100
Output for 5.4.28
2015-11-07T22:44:59+01:002015-11-07T22:44:59+0100
Output for 5.4.27
2015-11-07T22:45:00+01:002015-11-07T22:45:00+0100
Output for 5.4.26
2015-11-07T22:45:01+01:002015-11-07T22:45:01+0100
Output for 5.4.25
2015-11-07T22:45:02+01:002015-11-07T22:45:02+0100
Output for 5.4.24
2015-11-07T22:45:03+01:002015-11-07T22:45:03+0100
Output for 5.4.23
2015-11-07T22:45:04+01:002015-11-07T22:45:04+0100
Output for 5.3.28, 5.4.22
2015-11-07T22:45:05+01:002015-11-07T22:45:05+0100
Output for 5.4.21
2015-11-07T22:45:06+01:002015-11-07T22:45:06+0100
Output for 5.4.20
2015-11-07T22:45:07+01:002015-11-07T22:45:07+0100
Output for 5.4.19
2015-11-07T22:45:08+01:002015-11-07T22:45:08+0100
Output for 5.4.18
2015-11-07T22:45:09+01:002015-11-07T22:45:09+0100
Output for 5.3.27, 5.4.17
2015-11-07T22:45:10+01:002015-11-07T22:45:10+0100
Output for 5.3.26, 5.4.16
2015-11-07T22:45:11+01:002015-11-07T22:45:11+0100
Output for 5.3.25, 5.4.15
2015-11-07T22:45:12+01:002015-11-07T22:45:12+0100
Output for 5.3.24, 5.4.14
2015-11-07T22:45:13+01:002015-11-07T22:45:13+0100
Output for 5.3.23, 5.4.13
2015-11-07T22:45:14+01:002015-11-07T22:45:14+0100
Output for 5.4.12
2015-11-07T22:45:15+01:002015-11-07T22:45:15+0100
Output for 5.3.20, 5.4.11
2015-11-07T22:45:17+01:002015-11-07T22:45:17+0100
Output for 5.4.9 - 5.4.10
2015-11-07T22:45:18+01:002015-11-07T22:45:18+0100
Output for 5.3.17, 5.4.7 - 5.4.8
2015-11-07T22:45:20+01:002015-11-07T22:45:20+0100
Output for 5.3.16, 5.4.6
2015-11-07T22:45:21+01:002015-11-07T22:45:21+0100
Output for 5.3.15, 5.4.5
2015-11-07T22:45:22+01:002015-11-07T22:45:22+0100
Output for 5.3.14, 5.4.4
2015-11-07T22:45:23+01:002015-11-07T22:45:23+0100
Output for 5.3.13, 5.4.3
2015-11-07T22:45:24+01:002015-11-07T22:45:24+0100
Output for 5.3.12, 5.4.2
2015-11-07T22:45:25+01:002015-11-07T22:45:25+0100
Output for 5.3.11, 5.4.1
2015-11-07T22:45:26+01:002015-11-07T22:45:26+0100
Output for 5.3.10, 5.4.0
2015-11-07T22:45:27+01:002015-11-07T22:45:27+0100
Output for 5.3.21 - 5.3.22
2015-11-07T22:45:16+01:002015-11-07T22:45:16+0100
Output for 5.3.18 - 5.3.19
2015-11-07T22:45:19+01:002015-11-07T22:45:19+0100
Output for 5.3.7 - 5.3.9
2015-11-07T22:45:28+01:002015-11-07T22:45:28+0100
Output for 5.3.5 - 5.3.6
2015-11-07T22:45:29+01:002015-11-07T22:45:29+0100
Output for 5.2.15, 5.3.4
2015-11-07T22:45:31+01:002015-11-07T22:45:31+0100
Output for 5.2.14, 5.3.2 - 5.3.3
2015-11-07T22:45:32+01:002015-11-07T22:45:32+0100
Output for 5.2.11, 5.3.0 - 5.3.1
2015-11-07T22:45:34+01:002015-11-07T22:45:34+0100
Output for 5.2.16 - 5.2.17
2015-11-07T22:45:30+01:002015-11-07T22:45:30+0100
Output for 5.2.12 - 5.2.13
2015-11-07T22:45:33+01:002015-11-07T22:45:33+0100
Output for 5.2.9 - 5.2.10
2015-11-07T22:45:35+01:002015-11-07T22:45:35+0100
Output for 5.2.7 - 5.2.8
2015-11-07T22:45:36+01:002015-11-07T22:45:36+0100
Output for 5.2.4 - 5.2.6
2015-11-07T22:45:37+01:002015-11-07T22:45:37+0100
Output for 5.2.2 - 5.2.3
2015-11-07T22:45:38+01:002015-11-07T22:45:38+0100
Output for 5.2.0 - 5.2.1
2015-11-07T22:45:39+01:002015-11-07T22:45:39+0100
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/pFqS5 on line 2
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/pFqS5 on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/pFqS5 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/pFqS5 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/pFqS5 on line 4
Process exited with code 255.