3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date=(new \DateTime()); $date->setTimezone(new DateTimeZone('UTC')); echo $date->format('Y-m-d H:i:s');
Output for 5.6.28, 7.0.14 - 7.1.0
2014-07-23 01:50:28
Output for 7.0.6
2016-05-03 05:18:01
Output for 7.0.5
2016-04-02 18:17:27
Output for 7.0.4
2016-03-10 05:28:42
Output for 7.0.3
2016-03-18 05:57:26
Output for 7.0.2
2016-03-22 11:30:11
Output for 7.0.1
2016-03-23 16:49:51
Output for 7.0.0
2016-03-26 18:31:19
Output for hhvm-3.12.0
2016-03-11 14:48:14
Output for hhvm-3.10.0
2016-03-30 03:05:44
Output for 5.6.21
2016-05-02 00:35:43
Output for 5.6.20
2016-04-09 14:37:41
Output for 5.6.19
2016-03-07 06:59:33
Output for 5.6.18
2016-03-14 20:08:31
Output for 5.6.17
2016-03-19 10:17:01
Output for 5.6.16
2016-03-27 19:16:16
Output for 5.6.15
2016-03-28 20:10:14
Output for 5.6.14
2016-04-01 22:36:20
Output for 5.6.13
2016-04-15 02:40:40
Output for 5.6.12
2016-04-19 16:13:51
Output for 5.6.11
2016-04-22 23:12:04
Output for 5.6.10
2016-04-25 01:03:55
Output for 5.6.9
2016-04-27 06:01:48
Output for 5.6.8
2016-04-29 13:57:52
Output for 5.6.7
2016-05-25 06:40:04
Output for 5.5.35
2016-05-22 04:13:10
Output for 5.5.34
2016-04-10 19:31:50
Output for 5.5.33
2016-03-08 16:23:11
Output for 5.5.32
2016-03-16 22:26:02
Output for 5.5.31
2016-03-20 13:05:28
Output for 5.5.30
2016-03-31 22:10:44
Output for 5.5.29
2016-04-16 16:45:28
Output for 5.5.28
2016-04-20 19:18:42
Output for 5.5.27
2016-04-21 21:44:13
Output for 5.5.26
2016-04-26 03:29:37
Output for 5.5.25
2016-04-28 09:32:19
Output for 5.5.24
2016-05-23 16:28:14
Output for 5.4.45
2015-09-21 09:10:05
Output for 5.4.44
2015-09-21 09:10:01
Output for 5.4.43
2015-09-21 02:09:41
Output for 5.4.42
2015-09-21 02:09:03
Output for 5.4.41
2015-09-21 02:08:20
Output for 5.4.40
2015-09-21 02:07:29
Output for 5.4.39
2015-09-21 02:06:41
Output for 5.4.38
2015-03-05 05:55:13
Output for 5.4.35 - 5.4.37
2015-03-05 05:55:06
Output for 5.4.34
2015-03-05 05:55:05
Output for 5.4.32
2014-09-13 23:08:32
Output for 5.4.31
2014-09-13 23:08:31
Output for 5.4.23 - 5.4.30
2014-07-23 01:50:32
Output for 5.4.0 - 5.4.22
2014-07-23 01:50:33
Output for 5.3.29
2014-09-13 23:08:30
Output for 5.3.7 - 5.3.28
2014-07-23 01:50:34
Output for 5.3.0 - 5.3.6
2014-07-23 01:50:35
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/CMJ6Z on line 2 2014-07-23 01:50:35
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/CMJ6Z on line 2 Fatal error: Class 'DateTime' not found in /in/CMJ6Z on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/CMJ6Z on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/CMJ6Z on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/CMJ6Z on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/CMJ6Z on line 2