3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $timezone = new \DateTimeZone('America/New_York'); $datetime = new \DateTime(); $datetime->setTimezone($timezone); echo $datetime->format('Y-m-d H:i:s');
based on MRNGs
Output for 5.6.28, 7.0.20 - 7.2.0
2015-10-05 15:15:55
Output for 7.0.6
2016-05-03 03:22:01
Output for 7.0.5
2016-04-02 16:15:01
Output for 7.0.4
2016-03-10 02:44:05
Output for 7.0.3
2016-03-18 04:20:48
Output for 7.0.2
2016-03-22 10:14:31
Output for 7.0.1
2016-03-23 15:02:02
Output for 7.0.0
2016-03-26 16:35:31
Output for 5.6.21
2016-05-01 22:43:08
Output for 5.6.20
2016-04-09 15:11:07
Output for 5.6.19
2016-03-07 10:52:39
Output for 5.6.18
2016-03-14 19:45:42
Output for 5.6.17
2016-03-19 08:37:01
Output for 5.6.16
2016-03-27 17:20:58
Output for 5.6.15
2016-03-28 18:14:22
Output for 5.6.14
2016-04-01 20:47:21
Output for 5.6.13
2016-04-15 00:41:49
Output for 5.6.12
2016-04-19 14:24:45
Output for 5.6.11
2016-04-22 21:29:39
Output for 5.6.10
2016-04-24 23:13:00
Output for 5.6.9
2016-04-27 04:10:56
Output for 5.6.8
2016-04-29 12:15:18
Output for 5.5.35
2016-05-22 02:27:29
Output for 5.5.34
2016-04-10 17:31:55
Output for 5.5.33
2016-03-08 13:48:53
Output for 5.5.32
2016-03-16 21:29:37
Output for 5.5.31
2016-03-20 11:22:55
Output for 5.5.30
2016-03-31 20:21:46
Output for 5.5.29
2016-04-16 14:46:47
Output for 5.5.28
2016-04-20 17:30:20
Output for 5.5.27
2016-04-21 19:59:38
Output for 5.5.26
2016-04-26 01:39:57
Output for 5.5.25
2016-04-28 07:57:12
Output for 5.5.24
2016-05-23 14:59:53
Output for 5.4.45
2015-11-19 08:39:05
Output for 5.4.44
2015-11-19 08:39:06
Output for 5.4.43
2015-11-19 08:39:07
Output for 5.4.41 - 5.4.42
2015-11-19 08:39:08
Output for 5.4.39 - 5.4.40
2015-11-19 08:39:09
Output for 5.4.37 - 5.4.38
2015-11-19 08:39:10
Output for 5.4.35 - 5.4.36
2015-11-19 08:39:11
Output for 5.4.34
2015-11-19 08:39:12
Output for 5.3.29, 5.4.30 - 5.4.32
2015-11-19 08:39:13
Output for 5.4.26 - 5.4.29
2015-11-19 08:39:14
Output for 5.4.23 - 5.4.25
2015-11-19 08:39:15
Output for 5.3.28, 5.4.20 - 5.4.22
2015-11-19 08:39:16
Output for 5.3.27, 5.4.18 - 5.4.19
2015-11-19 08:39:17
Output for 5.3.25 - 5.3.26, 5.4.15 - 5.4.17
2015-11-19 08:39:18
Output for 5.3.21 - 5.3.24, 5.4.12 - 5.4.14
2015-11-19 08:39:19
Output for 5.3.18 - 5.3.20, 5.4.8 - 5.4.11
2015-11-19 08:39:20