3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new Datetime('now', new DateTimeZone('CET')); echo $date->format('Y-m-d H:i:s'); echo PHP_EOL; $date = new Datetime('now', new DateTimeZone('EST')); echo $date->format('Y-m-d H:i:s');
Output for 5.4.25, 5.6.28, 7.0.14 - 7.1.0
2014-02-27 21:11:25 2014-02-27 15:11:25
Output for 7.0.6
2016-05-03 01:07:47 2016-05-02 19:07:47
Output for 7.0.5
2016-04-02 14:23:16 2016-04-02 08:23:16
Output for 7.0.4
2016-03-10 00:50:48 2016-03-09 18:50:48
Output for 7.0.3
2016-03-18 01:03:01 2016-03-17 19:03:01
Output for 7.0.2
2016-03-21 11:38:18 2016-03-21 05:38:18
Output for 7.0.1
2016-03-23 11:49:58 2016-03-23 05:49:58
Output for 7.0.0
2016-03-26 14:21:42 2016-03-26 08:21:42
Output for 5.6.21
2016-05-01 20:10:14 2016-05-01 14:10:14
Output for 5.6.20
2016-04-09 09:38:06 2016-04-09 03:38:06
Output for 5.6.19
2016-03-06 23:06:14 2016-03-06 17:06:14
Output for 5.6.18
2016-03-14 10:36:38 2016-03-14 04:36:38
Output for 5.6.17
2016-03-19 05:32:04 2016-03-18 23:32:04
Output for 5.6.16
2016-03-27 15:06:51 2016-03-27 09:06:51
Output for 5.6.15
2016-03-28 15:59:31 2016-03-28 09:59:31
Output for 5.6.14
2016-04-01 18:39:02 2016-04-01 12:39:02
Output for 5.6.13
2016-04-14 22:26:58 2016-04-14 16:26:58
Output for 5.6.12
2016-04-19 11:34:58 2016-04-19 05:34:58
Output for 5.6.11
2016-04-22 18:51:18 2016-04-22 12:51:18
Output for 5.6.10
2016-04-24 20:31:10 2016-04-24 14:31:10
Output for 5.6.9
2016-04-27 01:40:03 2016-04-26 19:40:03
Output for 5.6.8
2016-04-29 09:15:13 2016-04-29 03:15:13
Output for 5.6.7
2016-05-24 19:55:45 2016-05-24 13:55:45
Output for 5.5.35
2016-05-21 23:27:42 2016-05-21 17:27:42
Output for 5.5.34
2016-04-10 15:33:38 2016-04-10 09:33:38
Output for 5.5.33
2016-03-08 11:45:04 2016-03-08 05:45:04
Output for 5.5.32
2016-03-16 17:25:33 2016-03-16 11:25:33
Output for 5.5.31
2016-03-20 08:25:09 2016-03-20 02:25:09
Output for 5.5.30
2016-03-31 18:01:41 2016-03-31 12:01:41
Output for 5.5.29
2016-04-16 12:33:33 2016-04-16 06:33:33
Output for 5.5.28
2016-04-20 14:49:11 2016-04-20 08:49:11
Output for 5.5.27
2016-04-21 17:23:03 2016-04-21 11:23:03
Output for 5.5.26
2016-04-25 22:48:30 2016-04-25 16:48:30
Output for 5.5.25
2016-04-28 04:56:25 2016-04-27 22:56:25
Output for 5.5.24
2016-04-30 12:28:24 2016-04-30 06:28:24
Output for 5.4.45
2015-09-14 01:31:58 2015-09-13 19:31:58
Output for 5.4.44
2015-09-14 01:31:55 2015-09-13 19:31:55
Output for 5.4.43
2015-09-14 01:31:52 2015-09-13 19:31:52
Output for 5.4.42
2015-09-14 01:31:50 2015-09-13 19:31:50
Output for 5.4.41
2015-09-14 01:31:49 2015-09-13 19:31:49
Output for 5.4.40
2015-05-08 14:54:31 2015-05-08 08:54:31
Output for 5.4.39
2015-05-08 14:54:30 2015-05-08 08:54:30
Output for 5.4.38
2015-03-02 10:54:53 2015-03-02 04:54:53
Output for 5.4.36 - 5.4.37
2015-02-08 06:11:26 2015-02-08 00:11:26
Output for 5.4.34 - 5.4.35
2014-12-04 22:49:21 2014-12-04 16:49:21
Output for 5.4.32
2014-09-06 22:17:14 2014-09-06 16:17:14
Output for 5.4.31
2014-09-06 22:17:10 2014-09-06 16:17:10
Output for 5.3.29, 5.4.30
2014-09-06 22:17:05 2014-09-06 16:17:05
Output for 5.4.29
2014-09-06 22:17:04 2014-09-06 16:17:04
Output for 5.4.28
2014-09-06 22:17:03 2014-09-06 16:17:03
Output for 5.4.26 - 5.4.27
2014-09-06 22:17:11 2014-09-06 16:17:11
Output for 5.4.3 - 5.4.24
2014-02-27 21:11:26 2014-02-27 15:11:26
Output for 5.3.11 - 5.3.28, 5.4.0 - 5.4.2
2014-02-27 21:11:27 2014-02-27 15:11:27
Output for 5.2.6 - 5.3.10
2014-02-27 21:11:28 2014-02-27 15:11:28
Output for 5.2.0 - 5.2.5
2014-02-27 21:11:29 2014-02-27 15:11:29
Output for 5.0.0 - 5.1.6
Fatal error: Class 'Datetime' not found in /in/IV8Hj on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/IV8Hj on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/IV8Hj on line 3