3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt = new \DateTime(); echo $dt->format('Y-m-d\TH:i:s');
based on vGg0L
Output for 5.6.28, 7.0.14 - 7.1.0
2014-11-03T17:36:14
Output for 7.0.6
2016-05-03T19:39:01
Output for 7.0.5
2016-04-03T07:59:38
Output for 7.0.4
2016-03-10T19:52:36
Output for 7.0.3
2016-03-18T21:11:50
Output for 7.0.2
2016-03-23T03:20:56
Output for 7.0.1
2016-03-24T06:44:53
Output for 7.0.0
2016-03-27T08:40:00
Output for 5.6.21
2016-05-02T14:47:16
Output for 5.6.20
2016-04-10T07:00:25
Output for 5.6.19
2016-03-08T04:05:12
Output for 5.6.18
2016-03-15T12:55:48
Output for 5.6.17
2016-03-20T00:29:29
Output for 5.6.16
2016-03-28T09:28:54
Output for 5.6.15
2016-03-29T10:18:34
Output for 5.6.14
2016-04-02T12:09:14
Output for 5.6.13
2016-04-15T16:39:14
Output for 5.6.12
2016-04-20T07:06:15
Output for 5.6.11
2016-04-24T13:30:33
Output for 5.6.10
2016-04-25T15:33:55
Output for 5.6.9
2016-04-27T20:42:39
Output for 5.6.8
2016-04-30T05:32:26
Output for 5.5.35
2016-05-22T23:15:27
Output for 5.5.34
2016-04-11T09:11:56
Output for 5.5.33
2016-03-09T06:55:58
Output for 5.5.32
2016-03-17T16:45:06
Output for 5.5.31
2016-03-21T03:34:46
Output for 5.5.30
2016-04-01T12:11:37
Output for 5.5.29
2016-04-17T06:57:41
Output for 5.5.28
2016-04-21T10:21:37
Output for 5.5.27
2016-04-22T12:04:45
Output for 5.5.26
2016-04-26T18:15:08
Output for 5.5.25
2016-04-29T01:37:45
Output for 5.5.24
2016-05-24T07:50:14
Output for 5.4.45
2015-09-07T06:29:27
Output for 5.4.44
2015-09-07T06:29:24
Output for 5.4.43
2015-09-07T06:29:20
Output for 5.4.42
2015-09-07T06:29:19
Output for 5.4.41
2015-09-07T06:29:17
Output for 5.4.40
2015-09-07T06:29:15
Output for 5.4.39
2015-09-07T06:29:14
Output for 5.4.38
2015-09-07T06:29:12
Output for 5.4.37
2015-09-07T06:29:10
Output for 5.4.36
2015-09-07T06:29:09
Output for 5.4.35
2015-09-07T06:29:08
Output for 5.4.19 - 5.4.34
2014-11-03T17:36:19
Output for 5.3.28 - 5.4.18
2014-11-03T17:36:20
Output for 5.3.7 - 5.3.27
2014-11-03T17:36:21
Output for 5.3.0 - 5.3.6
2014-11-03T17:36:22
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/3QJcK on line 2 2014-11-03T17:36:22
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/3QJcK on line 2 Fatal error: Class 'DateTime' not found in /in/3QJcK on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/3QJcK on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/3QJcK on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/3QJcK on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/3QJcK on line 2