3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dateTime = new DateTime($date, new DateTimeZone('America/Mexico_City')); echo $dateTime->format('c'). "\n"; $dateTime = new DateTime($date, new DateTimeZone('UTC')); echo $dateTime->format('c'). "\n";
Output for 5.6.28, 7.0.14 - 7.1.0
Notice: Undefined variable: date in /in/THgUj on line 2 2014-09-04T10:54:18-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2014-09-04T15:54:18+00:00
Output for 7.0.6
Notice: Undefined variable: date in /in/THgUj on line 2 2016-05-03T10:23:47-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-05-03T15:23:47+00:00
Output for 7.0.5
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-02T21:52:07-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-03T03:52:07+00:00
Output for 7.0.4
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-10T10:33:45-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-10T16:33:45+00:00
Output for 7.0.3
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-18T11:20:51-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-18T17:20:51+00:00
Output for 7.0.2
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-22T17:43:42-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-22T23:43:42+00:00
Output for 7.0.1
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-23T21:32:39-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-24T03:32:39+00:00
Output for 7.0.0
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-26T22:29:17-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-27T04:29:17+00:00
Output for hhvm-3.12.0
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-12T20:50:32-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-13T02:50:32+00:00
Output for hhvm-3.10.0
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-30T15:51:15-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-30T21:51:15+00:00
Output for 5.6.21
Notice: Undefined variable: date in /in/THgUj on line 2 2016-05-02T05:33:44-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-05-02T10:33:44+00:00
Output for 5.6.20
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-09T21:50:47-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-10T02:50:47+00:00
Output for 5.6.19
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-07T18:42:07-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-08T00:42:07+00:00
Output for 5.6.18
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-15T03:14:03-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-15T09:14:03+00:00
Output for 5.6.17
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-19T15:06:54-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-19T21:06:54+00:00
Output for 5.6.16
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-27T23:16:41-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-28T05:16:41+00:00
Output for 5.6.15
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-29T00:07:46-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-29T06:07:46+00:00
Output for 5.6.14
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-02T02:02:20-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-02T08:02:20+00:00
Output for 5.6.13
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-15T07:22:25-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-15T12:22:25+00:00
Output for 5.6.12
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-19T21:49:56-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-20T02:49:56+00:00
Output for 5.6.11
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-24T04:04:19-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-24T09:04:19+00:00
Output for 5.6.10
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-25T06:15:44-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-25T11:15:44+00:00
Output for 5.6.9
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-27T11:25:06-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-27T16:25:06+00:00
Output for 5.6.8
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-29T20:17:34-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-30T01:17:34+00:00
Output for 5.5.35
Notice: Undefined variable: date in /in/THgUj on line 2 2016-05-22T11:39:20-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-05-22T16:39:20+00:00
Output for 5.5.34
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-11T00:04:22-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-11T05:04:22+00:00
Output for 5.5.33
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-08T21:20:48-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-09T03:20:48+00:00
Output for 5.5.32
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-17T06:58:22-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-17T12:58:22+00:00
Output for 5.5.31
Notice: Undefined variable: date in /in/THgUj on line 2 2016-03-20T18:03:12-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-03-21T00:03:12+00:00
Output for 5.5.30
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-01T02:00:47-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-01T08:00:47+00:00
Output for 5.5.29
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-16T21:47:04-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-17T02:47:04+00:00
Output for 5.5.28
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-21T01:02:03-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-21T06:02:03+00:00
Output for 5.5.27
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-22T02:53:22-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-22T07:53:22+00:00
Output for 5.5.26
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-26T08:57:29-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-26T13:57:29+00:00
Output for 5.5.25
Notice: Undefined variable: date in /in/THgUj on line 2 2016-04-28T15:48:43-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-04-28T20:48:43+00:00
Output for 5.5.24
Notice: Undefined variable: date in /in/THgUj on line 2 2016-05-23T22:27:49-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2016-05-24T03:27:49+00:00
Output for 5.4.45
Notice: Undefined variable: date in /in/THgUj on line 2 2015-09-09T14:26:23-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2015-09-09T19:26:23+00:00
Output for 5.4.44
Notice: Undefined variable: date in /in/THgUj on line 2 2015-08-09T17:03:05-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2015-08-09T22:03:05+00:00
Output for 5.4.43
Notice: Undefined variable: date in /in/THgUj on line 2 2015-08-09T17:03:00-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2015-08-09T22:03:00+00:00
Output for 5.4.42
Notice: Undefined variable: date in /in/THgUj on line 2 2015-08-09T17:02:59-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2015-08-09T22:02:59+00:00
Output for 5.4.41
Notice: Undefined variable: date in /in/THgUj on line 2 2015-06-07T05:13:52-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2015-06-07T10:13:52+00:00
Output for 5.4.40
Notice: Undefined variable: date in /in/THgUj on line 2 2015-05-13T20:14:40-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2015-05-14T01:14:40+00:00
Output for 5.4.39
Notice: Undefined variable: date in /in/THgUj on line 2 2015-05-13T20:14:39-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2015-05-14T01:14:39+00:00
Output for 5.4.38
Notice: Undefined variable: date in /in/THgUj on line 2 2015-02-27T14:33:07-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2015-02-27T20:33:07+00:00
Output for 5.4.36 - 5.4.37
Notice: Undefined variable: date in /in/THgUj on line 2 2015-02-03T14:04:41-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2015-02-03T20:04:41+00:00
Output for 5.4.35
Notice: Undefined variable: date in /in/THgUj on line 2 2014-11-14T05:57:40-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2014-11-14T11:57:40+00:00
Output for 5.4.34
Notice: Undefined variable: date in /in/THgUj on line 2 2014-11-13T12:11:34-06:00 Notice: Undefined variable: date in /in/THgUj on line 5 2014-11-13T18:11:34+00:00
Output for 5.4.32
Notice: Undefined variable: date in /in/THgUj on line 2 2014-09-04T10:54:21-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2014-09-04T15:54:21+00:00
Output for 5.4.11 - 5.4.31
Notice: Undefined variable: date in /in/THgUj on line 2 2014-09-04T10:54:22-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2014-09-04T15:54:22+00:00
Output for 5.3.20 - 5.4.10
Notice: Undefined variable: date in /in/THgUj on line 2 2014-09-04T10:54:23-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2014-09-04T15:54:23+00:00
Output for 5.2.17 - 5.3.19
Notice: Undefined variable: date in /in/THgUj on line 2 2014-09-04T10:54:24-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2014-09-04T15:54:24+00:00
Output for 5.2.0 - 5.2.16
Notice: Undefined variable: date in /in/THgUj on line 2 2014-09-04T10:54:25-05:00 Notice: Undefined variable: date in /in/THgUj on line 5 2014-09-04T15:54:25+00:00
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/THgUj on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/THgUj on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/THgUj on line 2