3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime(); $dt->setTimezone(new DateTimeZone('UTC')); echo $dt->format('m-d H:i') ."\n\n"; $dt->setTimezone(new DateTimeZone('UTC')); echo $dt->format('m-d H:i');
based on WYrmm
Output for 5.3.23 - 5.4.44, 5.6.28, 7.0.20 - 7.2.0
08-31 16:10 08-31 16:10
Output for 7.0.6
05-03 04:32 05-03 04:32
Output for 7.0.5
04-02 17:34 04-02 17:34
Output for 7.0.4
03-10 04:38 03-10 04:38
Output for 7.0.3
03-18 05:03 03-18 05:03
Output for 7.0.2
03-22 10:34 03-22 10:34
Output for 7.0.1
03-23 16:02 03-23 16:02
Output for 7.0.0
03-26 17:45 03-26 17:45
Output for 5.6.21
05-01 23:48 05-01 23:48
Output for 5.6.20
04-09 12:50 04-09 12:50
Output for 5.6.19
03-07 05:37 03-07 05:37
Output for 5.6.18
03-14 18:07 03-14 18:07
Output for 5.6.17
03-19 09:25 03-19 09:25
Output for 5.6.16
03-27 18:30 03-27 18:30
Output for 5.6.15
03-28 19:23 03-28 19:23
Output for 5.6.14
04-01 21:52 04-01 21:52
Output for 5.6.13
04-15 01:55 04-15 01:55
Output for 5.6.12
04-19 15:27 04-19 15:27
Output for 5.6.11
04-22 22:23 04-22 22:23
Output for 5.6.10
04-25 00:16 04-25 00:16
Output for 5.6.9
04-27 05:15 04-27 05:15
Output for 5.6.8
04-29 13:08 04-29 13:08
Output for 5.6.7
05-25 04:28 05-25 04:28
Output for 5.5.35
05-22 03:26 05-22 03:26
Output for 5.5.34
04-10 18:47 04-10 18:47
Output for 5.5.33
03-08 15:32 03-08 15:32
Output for 5.5.32
03-16 21:34 03-16 21:34
Output for 5.5.31
03-20 12:14 03-20 12:14
Output for 5.5.30
03-31 21:23 03-31 21:23
Output for 5.5.29
04-16 16:01 04-16 16:01
Output for 5.5.28
04-20 18:30 04-20 18:30
Output for 5.5.27
04-21 20:57 04-21 20:57
Output for 5.5.26
04-26 02:41 04-26 02:41
Output for 5.5.25
04-28 08:43 04-28 08:43
Output for 5.5.24
05-23 15:39 05-23 15:39
Output for 5.4.45
09-06 15:04 09-06 15:04
Output for 5.2.0 - 5.3.22
08-31 16:11 08-31 16:11
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/Ms7fp on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/Ms7fp on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/Ms7fp on line 2