3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date=(new \DateTime()); $date->setTimezone(new DateTimeZone('America/Bogota')); echo $date->format('Y-m-d H:i:s');
Output for 7.0.14 - 7.1.0
2014-07-22 20:52:39
Output for 7.0.6
2016-05-02 19:54:55
Output for 7.0.5
2016-04-02 09:10:10
Output for 7.0.4
2016-03-09 19:45:22
Output for 7.0.3
2016-03-17 19:56:23
Output for 7.0.2
2016-03-21 06:30:28
Output for 7.0.1
2016-03-23 06:43:35
Output for 7.0.0
2016-03-26 09:09:29
Output for 5.6.21
2016-05-01 14:56:38
Output for 5.6.20
2016-04-09 04:22:07
Output for 5.6.19
2016-03-06 18:11:03
Output for 5.6.18
2016-03-14 06:22:42
Output for 5.6.17
2016-03-19 00:24:28
Output for 5.6.16
2016-03-27 09:53:34
Output for 5.6.15
2016-03-28 10:47:05
Output for 5.6.14
2016-04-01 13:23:50
Output for 5.6.13
2016-04-14 17:13:31
Output for 5.6.12
2016-04-19 06:23:39
Output for 5.6.11
2016-04-22 13:40:07
Output for 5.6.10
2016-04-24 15:19:27
Output for 5.6.9
2016-04-26 20:30:13
Output for 5.6.8
2016-04-29 04:07:07
Output for 5.6.7
2016-05-24 15:17:24
Output for 5.5.35
2016-05-21 18:20:49
Output for 5.5.34
2016-04-10 10:18:49
Output for 5.5.33
2016-03-08 06:35:48
Output for 5.5.32
2016-03-16 12:18:01
Output for 5.5.31
2016-03-20 03:17:04
Output for 5.5.30
2016-03-31 12:48:07
Output for 5.5.29
2016-04-16 07:20:42
Output for 5.5.28
2016-04-20 09:40:39
Output for 5.5.27
2016-04-21 12:10:15
Output for 5.5.26
2016-04-25 17:46:55
Output for 5.5.25
2016-04-27 23:47:00
Output for 5.5.24
2016-04-30 07:15:02
Output for 5.4.45
2015-09-21 04:10:08
Output for 5.4.44
2015-09-21 04:10:03
Output for 5.4.43
2015-09-20 21:09:43
Output for 5.4.42
2015-09-20 21:09:03
Output for 5.4.41
2015-09-20 21:08:17
Output for 5.4.40
2015-09-20 21:07:23
Output for 5.4.39
2015-09-20 21:06:36
Output for 5.4.38
2015-03-05 00:55:56
Output for 5.4.36 - 5.4.37
2015-03-05 00:55:49
Output for 5.4.34 - 5.4.35
2015-03-05 00:55:48
Output for 5.4.32
2014-09-13 18:08:52
Output for 5.4.31
2014-09-13 18:08:51
Output for 5.4.12 - 5.4.30
2014-07-22 20:52:43
Output for 5.3.19 - 5.3.28, 5.4.0 - 5.4.11
2014-07-22 20:52:44
Output for 5.3.29
2014-09-13 18:08:50
Output for 5.3.0 - 5.3.18
2014-07-22 20:52:45
Output for 5.2.15 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/McSuv on line 2 2014-07-22 20:52:45
Output for 5.2.0 - 5.2.14
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/McSuv on line 2 2014-07-22 20:52:46
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/McSuv on line 2 Fatal error: Class 'DateTime' not found in /in/McSuv 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/McSuv on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/McSuv 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/McSuv on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/McSuv on line 2