3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $today = new DateTime(); $int = new DateInterval("P6M"); $new_date = $today->add($int); echo $new_date->format(DateTime::RFC822);
based on IP6I8
Output for 5.6.28, 7.0.14 - 7.1.0
Thu, 02 Apr 15 23:09:25 +0200
Output for 7.0.6
Thu, 03 Nov 16 06:42:11 +0100
Output for 7.0.5
Sun, 02 Oct 16 19:43:22 +0200
Output for 7.0.4
Sat, 10 Sep 16 05:49:35 +0200
Output for 7.0.3
Sun, 18 Sep 16 06:15:34 +0200
Output for 7.0.2
Thu, 22 Sep 16 11:46:48 +0200
Output for 7.0.1
Fri, 23 Sep 16 17:12:38 +0200
Output for 7.0.0
Mon, 26 Sep 16 18:55:22 +0200
Output for hhvm-3.12.0
Sun, 11 Sep 16 14:47:51 +0200
Output for hhvm-3.10.0
Fri, 30 Sep 16 03:44:56 +0200
Output for 5.6.21
Wed, 02 Nov 16 01:58:30 +0100
Output for 5.6.20
Sun, 09 Oct 16 14:59:46 +0200
Output for 5.6.19
Wed, 07 Sep 16 06:48:18 +0200
Output for 5.6.18
Wed, 14 Sep 16 19:36:18 +0200
Output for 5.6.17
Mon, 19 Sep 16 10:36:31 +0200
Output for 5.6.16
Tue, 27 Sep 16 20:40:27 +0200
Output for 5.6.15
Wed, 28 Sep 16 21:32:51 +0200
Output for 5.6.14
Sun, 02 Oct 16 00:01:18 +0200
Output for 5.6.13
Sat, 15 Oct 16 04:06:05 +0200
Output for 5.6.12
Wed, 19 Oct 16 17:36:58 +0200
Output for 5.6.11
Sun, 23 Oct 16 00:35:05 +0200
Output for 5.6.10
Tue, 25 Oct 16 02:26:23 +0200
Output for 5.6.9
Thu, 27 Oct 16 07:25:10 +0200
Output for 5.6.8
Sat, 29 Oct 16 15:18:27 +0200
Output for 5.6.7
Fri, 25 Nov 16 06:54:41 +0100
Output for 5.5.35
Tue, 22 Nov 16 05:36:53 +0100
Output for 5.5.34
Mon, 10 Oct 16 20:57:00 +0200
Output for 5.5.33
Thu, 08 Sep 16 16:43:19 +0200
Output for 5.5.32
Fri, 16 Sep 16 22:45:48 +0200
Output for 5.5.31
Tue, 20 Sep 16 13:25:24 +0200
Output for 5.5.30
Sat, 01 Oct 16 23:32:56 +0200
Output for 5.5.29
Sun, 16 Oct 16 18:11:11 +0200
Output for 5.5.28
Thu, 20 Oct 16 20:40:22 +0200
Output for 5.5.27
Fri, 21 Oct 16 23:07:21 +0200
Output for 5.5.26
Wed, 26 Oct 16 04:51:59 +0200
Output for 5.5.25
Fri, 28 Oct 16 10:54:18 +0200
Output for 5.5.24
Wed, 23 Nov 16 17:49:47 +0100
Output for 5.4.45
Fri, 18 Mar 16 17:21:02 +0100
Output for 5.4.44
Mon, 22 Feb 16 10:30:56 +0100
Output for 5.4.43
Mon, 22 Feb 16 10:30:53 +0100
Output for 5.4.42
Mon, 22 Feb 16 10:30:51 +0100
Output for 5.4.41
Mon, 22 Feb 16 10:30:49 +0100
Output for 5.4.39 - 5.4.40
Mon, 22 Feb 16 10:30:44 +0100
Output for 5.4.38
Tue, 15 Sep 15 12:58:57 +0200
Output for 5.4.36 - 5.4.37
Tue, 15 Sep 15 12:58:49 +0200
Output for 5.4.34 - 5.4.35
Tue, 15 Sep 15 12:58:48 +0200
Output for 5.4.28 - 5.4.32
Thu, 02 Apr 15 23:09:29 +0200
Output for 5.4.6 - 5.4.27
Thu, 02 Apr 15 23:09:30 +0200
Output for 5.3.15 - 5.4.5
Thu, 02 Apr 15 23:09:31 +0200
Output for 5.3.0 - 5.3.14
Thu, 02 Apr 15 23:09:32 +0200
Output for 5.2.0 - 5.2.17
Fatal error: Class 'DateInterval' not found in /in/36jo7 on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/36jo7 on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/36jo7 on line 7
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/36jo7 on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/36jo7 on line 7
Process exited with code 255.