3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime(); $dt->modify('+5 day'); $dt1 = $dt->format(DateTime::ISO8601); echo $dt1;
based on 9hXTP
Output for 5.6.28, 7.0.14 - 7.1.0
2014-10-08T16:34:09+0200
Output for 7.0.6
2016-05-08T10:16:59+0200
Output for 7.0.5
2016-04-07T23:04:14+0200
Output for 7.0.4
2016-03-15T09:39:46+0100
Output for 7.0.3
2016-03-23T10:19:23+0100
Output for 7.0.2
2016-03-27T16:17:52+0200
Output for 7.0.1
2016-03-28T20:54:02+0200
Output for 7.0.0
2016-03-31T22:26:30+0200
Output for hhvm-3.12.0
2016-03-17T12:54:49+0100
Output for hhvm-3.10.0
2016-04-04T11:59:49+0200
Output for 5.6.21
2016-05-07T05:36:53+0200
Output for 5.6.20
2016-04-14T22:03:24+0200
Output for 5.6.19
2016-03-12T17:47:32+0100
Output for 5.6.18
2016-03-20T01:52:38+0100
Output for 5.6.17
2016-03-24T14:33:17+0100
Output for 5.6.16
2016-04-02T00:14:08+0200
Output for 5.6.15
2016-04-03T01:18:46+0200
Output for 5.6.14
2016-04-07T03:38:03+0200
Output for 5.6.13
2016-04-20T07:32:19+0200
Output for 5.6.12
2016-04-24T21:20:14+0200
Output for 5.6.11
2016-04-28T04:22:15+0200
Output for 5.6.10
2016-04-30T06:07:11+0200
Output for 5.6.9
2016-05-02T11:05:58+0200
Output for 5.6.8
2016-05-04T19:13:58+0200
Output for 5.5.35
2016-05-27T09:24:34+0200
Output for 5.5.34
2016-04-16T00:23:08+0200
Output for 5.5.33
2016-03-13T20:44:31+0100
Output for 5.5.32
2016-03-22T03:26:57+0100
Output for 5.5.31
2016-03-25T17:18:46+0100
Output for 5.5.30
2016-04-06T03:15:30+0200
Output for 5.5.29
2016-04-21T21:39:22+0200
Output for 5.5.28
2016-04-26T00:35:29+0200
Output for 5.5.27
2016-04-27T02:53:40+0200
Output for 5.5.26
2016-05-01T08:33:18+0200
Output for 5.5.25
2016-05-03T14:52:03+0200
Output for 5.5.24
2016-05-28T22:12:50+0200
Output for 5.4.45
2015-09-25T10:07:29+0200
Output for 5.4.44
2015-08-22T02:01:50+0200
Output for 5.4.43
2015-08-22T02:01:45+0200
Output for 5.4.42
2015-08-22T02:01:44+0200
Output for 5.4.41
2015-08-22T02:01:42+0200
Output for 5.4.40
2015-08-22T02:01:37+0200
Output for 5.4.39
2015-08-22T02:01:36+0200
Output for 5.4.38
2015-03-20T13:41:46+0100
Output for 5.4.37
2015-03-20T13:41:39+0100
Output for 5.4.34 - 5.4.36
2015-03-20T13:41:38+0100
Output for 5.4.19 - 5.4.32
2014-10-08T16:34:12+0200
Output for 5.3.29 - 5.4.18
2014-10-08T16:34:13+0200
Output for 5.3.9 - 5.3.28
2014-10-08T16:34:14+0200
Output for 5.2.3 - 5.3.8
2014-10-08T16:34:15+0200
Output for 5.2.0 - 5.2.2
2014-10-08T16:34:16+0200
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/ongqs on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/ongqs 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/ongqs on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/ongqs on line 4
Process exited with code 255.