3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ESTTZ = new DateTimeZone('America/New_York'); $dt = new DateTime(); $dt->setTimezone($ESTTZ); echo $dt->format(DATE_RFC822);
Output for 5.6.28, 7.0.14 - 7.1.0
Tue, 15 Apr 14 17:24:27 -0400
Output for 7.0.6
Tue, 03 May 16 01:43:04 -0400
Output for 7.0.5
Sat, 02 Apr 16 14:41:21 -0400
Output for 7.0.4
Thu, 10 Mar 16 00:54:52 -0500
Output for 7.0.3
Fri, 18 Mar 16 02:25:32 -0400
Output for 7.0.2
Tue, 22 Mar 16 08:10:56 -0400
Output for 7.0.1
Wed, 23 Mar 16 13:14:59 -0400
Output for 7.0.0
Sat, 26 Mar 16 14:56:00 -0400
Output for 5.6.21
Sun, 01 May 16 21:00:59 -0400
Output for 5.6.20
Sat, 09 Apr 16 13:27:53 -0400
Output for 5.6.19
Mon, 07 Mar 16 03:05:48 -0500
Output for 5.6.18
Mon, 14 Mar 16 17:26:27 -0400
Output for 5.6.17
Sat, 19 Mar 16 06:44:28 -0400
Output for 5.6.16
Sun, 27 Mar 16 15:41:03 -0400
Output for 5.6.15
Mon, 28 Mar 16 16:34:46 -0400
Output for 5.6.14
Fri, 01 Apr 16 19:09:13 -0400
Output for 5.6.13
Thu, 14 Apr 16 23:04:37 -0400
Output for 5.6.12
Tue, 19 Apr 16 12:39:25 -0400
Output for 5.6.11
Fri, 22 Apr 16 19:38:03 -0400
Output for 5.6.10
Sun, 24 Apr 16 21:29:56 -0400
Output for 5.6.9
Wed, 27 Apr 16 02:27:22 -0400
Output for 5.6.8
Fri, 29 Apr 16 10:25:35 -0400
Output for 5.6.7
Wed, 25 May 16 03:57:05 -0400
Output for 5.5.35
Sun, 22 May 16 00:42:27 -0400
Output for 5.5.34
Sun, 10 Apr 16 15:56:30 -0400
Output for 5.5.33
Tue, 08 Mar 16 11:49:08 -0500
Output for 5.5.32
Wed, 16 Mar 16 19:26:21 -0400
Output for 5.5.31
Sun, 20 Mar 16 09:32:15 -0400
Output for 5.5.30
Thu, 31 Mar 16 18:42:34 -0400
Output for 5.5.29
Sat, 16 Apr 16 13:09:38 -0400
Output for 5.5.28
Wed, 20 Apr 16 15:45:01 -0400
Output for 5.5.27
Thu, 21 Apr 16 18:10:11 -0400
Output for 5.5.26
Mon, 25 Apr 16 23:55:25 -0400
Output for 5.5.25
Thu, 28 Apr 16 05:58:20 -0400
Output for 5.5.24
Mon, 23 May 16 12:54:23 -0400
Output for 5.4.45
Sat, 19 Sep 15 18:07:14 -0400
Output for 5.4.44
Sat, 19 Sep 15 18:07:11 -0400
Output for 5.4.43
Mon, 13 Jul 15 08:50:49 -0400
Output for 5.4.42
Mon, 13 Jul 15 08:50:47 -0400
Output for 5.4.41
Mon, 13 Jul 15 08:50:46 -0400
Output for 5.4.39 - 5.4.40
Fri, 15 May 15 05:44:19 -0400
Output for 5.4.38
Mon, 02 Mar 15 15:59:59 -0500
Output for 5.4.36 - 5.4.37
Sun, 08 Feb 15 22:10:20 -0500
Output for 5.4.34 - 5.4.35
Sun, 08 Feb 15 22:10:19 -0500
Output for 5.4.32
Tue, 09 Sep 14 00:04:01 -0400
Output for 5.4.31
Tue, 09 Sep 14 00:03:58 -0400
Output for 5.4.29 - 5.4.30
Tue, 09 Sep 14 00:03:53 -0400
Output for 5.4.28
Tue, 09 Sep 14 00:03:52 -0400
Output for 5.4.21 - 5.4.27
Tue, 15 Apr 14 17:24:28 -0400
Output for 5.3.28, 5.4.0 - 5.4.20
Tue, 15 Apr 14 17:24:29 -0400
Output for 5.3.29
Tue, 09 Sep 14 00:03:54 -0400
Output for 5.3.6 - 5.3.27
Tue, 15 Apr 14 17:24:30 -0400
Output for 5.2.0 - 5.3.5
Tue, 15 Apr 14 17:24:31 -0400
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTimeZone' not found in /in/Gfsrk on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/Gfsrk on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/Gfsrk on line 2