3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('America/New_York'); $now = new DateTime(); echo $now->format('Y-m-d H:i:s');
Output for 5.6.28, 7.0.14 - 7.1.0
2014-06-19 09:57:38
Output for 7.0.6
2016-05-02 18:30:42
Output for 7.0.5
2016-04-02 08:04:09
Output for 7.0.4
2016-03-09 17:01:41
Output for 7.0.3
2016-03-17 18:26:41
Output for 7.0.2
2016-03-21 05:09:24
Output for 7.0.1
2016-03-23 04:48:35
Output for 7.0.0
2016-03-26 07:53:24
Output for hhvm-3.12.0
2016-03-10 20:39:58
Output for hhvm-3.10.0
2016-03-29 11:12:00
Output for 5.6.21
2016-05-01 13:36:21
Output for 5.6.20
2016-04-09 03:19:43
Output for 5.6.19
2016-03-06 14:26:38
Output for 5.6.18
2016-03-14 03:49:11
Output for 5.6.17
2016-03-18 23:02:11
Output for 5.6.16
2016-03-27 08:37:45
Output for 5.6.15
2016-03-28 09:36:32
Output for 5.6.14
2016-04-01 12:18:25
Output for 5.6.13
2016-04-14 16:15:20
Output for 5.6.12
2016-04-19 05:19:09
Output for 5.6.11
2016-04-22 12:37:18
Output for 5.6.10
2016-04-24 14:15:45
Output for 5.6.9
2016-04-26 19:20:19
Output for 5.6.8
2016-04-29 02:54:31
Output for 5.6.7
2016-05-24 12:44:44
Output for 5.5.35
2016-05-21 16:49:45
Output for 5.5.34
2016-04-10 08:56:41
Output for 5.5.33
2016-03-08 04:13:20
Output for 5.5.32
2016-03-15 14:15:06
Output for 5.5.31
2016-03-20 01:56:32
Output for 5.5.30
2016-03-31 11:40:57
Output for 5.5.29
2016-04-16 06:18:03
Output for 5.5.28
2016-04-20 08:28:54
Output for 5.5.27
2016-04-21 11:08:24
Output for 5.5.26
2016-04-25 16:30:12
Output for 5.5.25
2016-04-27 22:37:11
Output for 5.5.24
2016-04-30 06:16:05
Output for 5.4.45
2015-09-11 21:54:35
Output for 5.4.44
2015-09-11 21:54:33
Output for 5.4.43
2015-09-11 21:54:30
Output for 5.4.42
2015-07-08 12:55:13
Output for 5.4.41
2015-05-26 00:49:05
Output for 5.4.40
2015-05-02 02:38:08
Output for 5.4.39
2015-05-02 02:38:07
Output for 5.4.38
2015-02-28 17:03:54
Output for 5.4.36 - 5.4.37
2015-02-06 00:45:22
Output for 5.4.34 - 5.4.35
2014-11-16 00:34:09
Output for 5.4.32
2014-09-03 23:29:10
Output for 5.4.31
2014-09-03 23:29:08
Output for 5.4.30
2014-09-03 23:29:04
Output for 5.4.17 - 5.4.29
2014-06-19 09:57:43
Output for 5.3.26 - 5.3.28, 5.4.0 - 5.4.16
2014-06-19 09:57:44
Output for 5.3.29
2014-09-03 23:29:05
Output for 5.3.6 - 5.3.25
2014-06-19 09:57:45
Output for 5.2.1 - 5.3.5
2014-06-19 09:57:46
Output for 5.2.0
2014-06-19 09:57:47
Output for 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/vEgDh on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/vEgDh on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_default_timezone_set() in /in/vEgDh on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: date_default_timezone_set() in /in/vEgDh on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_default_timezone_set() in /in/vEgDh on line 3