3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); var_dump($date->format('T')); $date->setTimezone(new DateTimeZone('CET')); var_dump($date->format('c e T'));
Output for 5.6.28, 7.0.14 - 7.1.0
string(4) "CEST" string(33) "2014-05-24T11:39:46+01:00 CET CET"
Output for 7.0.6
string(4) "CEST" string(33) "2016-05-03T01:38:39+01:00 CET CET"
Output for 7.0.5
string(4) "CEST" string(33) "2016-04-02T14:54:52+01:00 CET CET"
Output for 7.0.4
string(3) "CET" string(33) "2016-03-10T01:26:58+01:00 CET CET"
Output for 7.0.3
string(3) "CET" string(33) "2016-03-18T01:37:16+01:00 CET CET"
Output for 7.0.2
string(3) "CET" string(33) "2016-03-21T12:11:58+01:00 CET CET"
Output for 7.0.1
string(3) "CET" string(33) "2016-03-23T12:24:56+01:00 CET CET"
Output for 7.0.0
string(3) "CET" string(33) "2016-03-26T14:52:30+01:00 CET CET"
Output for 5.6.21
string(4) "CEST" string(33) "2016-05-01T20:40:52+01:00 CET CET"
Output for 5.6.20
string(4) "CEST" string(33) "2016-04-09T10:07:10+01:00 CET CET"
Output for 5.6.19
string(3) "CET" string(33) "2016-03-06T23:44:00+01:00 CET CET"
Output for 5.6.18
string(3) "CET" string(33) "2016-03-14T12:05:22+01:00 CET CET"
Output for 5.6.17
string(3) "CET" string(33) "2016-03-19T06:06:06+01:00 CET CET"
Output for 5.6.16
string(4) "CEST" string(33) "2016-03-27T15:37:19+01:00 CET CET"
Output for 5.6.15
string(4) "CEST" string(33) "2016-03-28T16:30:54+01:00 CET CET"
Output for 5.6.14
string(4) "CEST" string(33) "2016-04-01T19:08:43+01:00 CET CET"
Output for 5.6.13
string(4) "CEST" string(33) "2016-04-14T22:56:42+01:00 CET CET"
Output for 5.6.12
string(4) "CEST" string(33) "2016-04-19T12:07:08+01:00 CET CET"
Output for 5.6.11
string(4) "CEST" string(33) "2016-04-22T19:23:07+01:00 CET CET"
Output for 5.6.10
string(4) "CEST" string(33) "2016-04-24T21:02:51+01:00 CET CET"
Output for 5.6.9
string(4) "CEST" string(33) "2016-04-27T02:13:08+01:00 CET CET"
Output for 5.6.8
string(4) "CEST" string(33) "2016-04-29T09:48:11+01:00 CET CET"
Output for 5.6.7
string(4) "CEST" string(33) "2016-05-24T20:49:12+01:00 CET CET"
Output for 5.5.35
string(4) "CEST" string(33) "2016-05-22T00:03:52+01:00 CET CET"
Output for 5.5.34
string(4) "CEST" string(33) "2016-04-10T16:03:23+01:00 CET CET"
Output for 5.5.33
string(3) "CET" string(33) "2016-03-08T12:17:54+01:00 CET CET"
Output for 5.5.32
string(3) "CET" string(33) "2016-03-16T17:59:39+01:00 CET CET"
Output for 5.5.31
string(3) "CET" string(33) "2016-03-20T08:58:38+01:00 CET CET"
Output for 5.5.30
string(4) "CEST" string(33) "2016-03-31T18:32:13+01:00 CET CET"
Output for 5.5.29
string(4) "CEST" string(33) "2016-04-16T13:04:31+01:00 CET CET"
Output for 5.5.28
string(4) "CEST" string(33) "2016-04-20T15:23:40+01:00 CET CET"
Output for 5.5.27
string(4) "CEST" string(33) "2016-04-21T17:53:50+01:00 CET CET"
Output for 5.5.26
string(4) "CEST" string(33) "2016-04-25T23:21:55+01:00 CET CET"
Output for 5.5.25
string(4) "CEST" string(33) "2016-04-28T05:29:50+01:00 CET CET"
Output for 5.5.24
string(4) "CEST" string(33) "2016-04-30T12:59:22+01:00 CET CET"
Output for 5.4.45
string(4) "CEST" string(44) "2015-09-20T23:30:51+02:00 Europe/Berlin CEST"
Output for 5.4.44
string(4) "CEST" string(44) "2015-09-04T08:27:48+02:00 Europe/Berlin CEST"
Output for 5.4.43
string(4) "CEST" string(44) "2015-09-04T08:27:46+02:00 Europe/Berlin CEST"
Output for 5.4.42
string(4) "CEST" string(44) "2015-09-04T08:27:45+02:00 Europe/Berlin CEST"
Output for 5.4.41
string(4) "CEST" string(44) "2015-05-15T21:02:13+02:00 Europe/Berlin CEST"
Output for 5.4.39 - 5.4.40
string(4) "CEST" string(44) "2015-05-15T21:02:07+02:00 Europe/Berlin CEST"
Output for 5.4.38
string(3) "CET" string(43) "2015-03-03T06:03:18+01:00 Europe/Berlin CET"
Output for 5.4.36 - 5.4.37
string(3) "CET" string(43) "2015-02-11T14:10:58+01:00 Europe/Berlin CET"
Output for 5.4.34 - 5.4.35
string(3) "CET" string(43) "2015-02-11T14:10:57+01:00 Europe/Berlin CET"
Output for 5.4.32
string(4) "CEST" string(44) "2014-09-10T17:42:36+02:00 Europe/Berlin CEST"
Output for 5.4.31
string(4) "CEST" string(44) "2014-09-10T17:42:34+02:00 Europe/Berlin CEST"
Output for 5.3.29, 5.4.29 - 5.4.30
string(4) "CEST" string(44) "2014-09-10T17:42:32+02:00 Europe/Berlin CEST"
Output for 5.4.18 - 5.4.28
string(4) "CEST" string(44) "2014-05-24T12:39:51+02:00 Europe/Berlin CEST"
Output for 5.4.1 - 5.4.17
string(4) "CEST" string(44) "2014-05-24T12:39:52+02:00 Europe/Berlin CEST"
Output for 5.3.14 - 5.3.28, 5.4.0
string(4) "CEST" string(44) "2014-05-24T12:39:53+02:00 Europe/Berlin CEST"
Output for 5.2.16 - 5.3.13
string(4) "CEST" string(44) "2014-05-24T12:39:54+02:00 Europe/Berlin CEST"
Output for 5.2.0 - 5.2.15
string(4) "CEST" string(44) "2014-05-24T12:39:55+02:00 Europe/Berlin CEST"
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/7FG7u on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/7FG7u on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/7FG7u on line 3