3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime(); $dt->setTimezone(new DateTimeZone('CST')); echo $dt->format('m-d H:i') ."\n\n"; $dt->setTimezone(new DateTimeZone('CST')); echo $dt->format('m-d H:i');
based on Ms7fp
Output for 7.0.20, 7.1.5 - 7.2.0
08-31 10:11 08-31 10:11
Output for 5.6.28, 7.1.0
08-31 10:11 08-31 04:11
Output for 7.0.6
05-03 07:10 05-03 01:10
Output for 7.0.5
04-02 19:46 04-02 13:46
Output for 7.0.4
03-10 08:08 03-10 02:08
Output for 7.0.3
03-18 08:46 03-18 02:46
Output for 7.0.2
03-22 14:53 03-22 08:53
Output for 7.0.1
03-23 19:17 03-23 13:17
Output for 7.0.0
03-26 20:16 03-26 14:16
Output for 5.6.21
05-02 02:21 05-01 20:21
Output for 5.6.20
04-09 18:42 04-09 12:42
Output for 5.6.19
03-07 15:51 03-07 09:51
Output for 5.6.18
03-15 00:44 03-14 18:44
Output for 5.6.17
03-19 12:42 03-19 06:42
Output for 5.6.16
03-27 21:06 03-27 15:06
Output for 5.6.15
03-28 21:58 03-28 15:58
Output for 5.6.14
04-02 00:00 04-01 18:00
Output for 5.6.13
04-15 04:12 04-14 22:12
Output for 5.6.12
04-19 18:31 04-19 12:31
Output for 5.6.11
04-23 01:07 04-22 19:07
Output for 5.6.10
04-25 02:58 04-24 20:58
Output for 5.6.9
04-27 08:05 04-27 02:05
Output for 5.6.8
04-29 16:40 04-29 10:40
Output for 5.5.35
05-22 06:48 05-22 00:48
Output for 5.5.34
04-10 20:58 04-10 14:58
Output for 5.5.33
03-08 18:57 03-08 12:57
Output for 5.5.32
03-17 04:13 03-16 22:13
Output for 5.5.31
03-20 15:27 03-20 09:27
Output for 5.5.30
03-31 23:52 03-31 17:52
Output for 5.5.29
04-16 18:31 04-16 12:31
Output for 5.5.28
04-20 21:43 04-20 15:43
Output for 5.5.27
04-21 23:44 04-21 17:44
Output for 5.5.26
04-26 05:37 04-25 23:37
Output for 5.5.25
04-28 12:12 04-28 06:12
Output for 5.5.24
05-23 19:13 05-23 13:13
Output for 5.4.45
09-06 10:05 09-06 10:05
Output for 5.2.0 - 5.4.44
08-31 11:11 08-31 11:11
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/SKav8 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/SKav8 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/SKav8 on line 2