3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime('now'); $dt->modify('+5 day'); $dt->format(DateTime::ISO8601); print_r($dt);
based on v45Qi
Output for 7.1.0
DateTime Object ( [date] => 2014-10-08 16:31:39.004133 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.28, 7.0.14
DateTime Object ( [date] => 2014-10-08 16:31:39.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.6
DateTime Object ( [date] => 2016-05-26 19:42:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.5
DateTime Object ( [date] => 2016-04-07 23:04:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.4
DateTime Object ( [date] => 2016-03-15 09:39:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.3
DateTime Object ( [date] => 2016-03-23 10:19:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.2
DateTime Object ( [date] => 2016-03-27 16:17:52.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.1
DateTime Object ( [date] => 2016-03-28 20:54:02.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.0
DateTime Object ( [date] => 2016-03-31 22:26:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.21
DateTime Object ( [date] => 2016-05-07 21:38:02.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.20
DateTime Object ( [date] => 2016-04-15 13:24:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.19
DateTime Object ( [date] => 2016-03-12 17:47:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.18
DateTime Object ( [date] => 2016-03-20 01:52:38.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.17
DateTime Object ( [date] => 2016-03-24 14:33:16.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.16
DateTime Object ( [date] => 2016-04-02 00:14:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.15
DateTime Object ( [date] => 2016-04-03 01:18:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.14
DateTime Object ( [date] => 2016-04-07 03:38:03.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.13
DateTime Object ( [date] => 2016-04-20 21:48:02.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.12
DateTime Object ( [date] => 2016-04-25 12:50:37.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.11
DateTime Object ( [date] => 2016-04-29 18:44:53.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.10
DateTime Object ( [date] => 2016-04-30 20:53:19.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.9
DateTime Object ( [date] => 2016-05-03 02:51:44.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.8
DateTime Object ( [date] => 2016-05-05 10:37:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.35
DateTime Object ( [date] => 2016-05-28 11:01:51.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.34
DateTime Object ( [date] => 2016-04-16 15:41:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.33
DateTime Object ( [date] => 2016-03-13 20:44:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.32
DateTime Object ( [date] => 2016-03-22 03:26:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.31
DateTime Object ( [date] => 2016-03-25 17:18:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.30
DateTime Object ( [date] => 2016-04-06 03:15:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.29
DateTime Object ( [date] => 2016-04-22 11:57:49.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.28
DateTime Object ( [date] => 2016-04-26 15:39:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.27
DateTime Object ( [date] => 2016-04-27 17:10:49.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.26
DateTime Object ( [date] => 2016-05-01 23:34:56.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.25
DateTime Object ( [date] => 2016-05-04 07:09:59.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.24
DateTime Object ( [date] => 2016-05-29 14:17:02.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.45
DateTime Object ( [date] => 2015-09-25 10:06:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.44
DateTime Object ( [date] => 2015-08-22 01:58:32.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.43
DateTime Object ( [date] => 2015-08-22 01:58:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.42
DateTime Object ( [date] => 2015-08-22 01:58:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.41
DateTime Object ( [date] => 2015-08-22 01:58:24.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.40
DateTime Object ( [date] => 2015-08-22 01:58:20.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.39
DateTime Object ( [date] => 2015-08-22 01:58:19.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.38
DateTime Object ( [date] => 2015-03-20 13:38:21.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.36 - 5.4.37
DateTime Object ( [date] => 2015-03-20 13:38:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.34 - 5.4.35
DateTime Object ( [date] => 2015-03-20 13:38:13.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.30 - 5.4.32
DateTime Object ( [date] => 2014-10-08 16:31:43.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.29
DateTime Object ( [date] => 2014-10-08 16:31:43 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.9 - 5.4.28
DateTime Object ( [date] => 2014-10-08 16:31:44 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.20 - 5.4.8
DateTime Object ( [date] => 2014-10-08 16:31:45 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.0 - 5.3.19
DateTime Object ( [date] => 2014-10-08 16:31:46 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.2.0 - 5.2.17
DateTime Object ( )
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/WgOEl on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/WgOEl 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/WgOEl on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/WgOEl on line 4
Process exited with code 255.