3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d = new DateTime("now"); var_dump($d->format("Y-m-d H:i:s"));
based on V3k6v
Output for 5.6.28, 7.0.14 - 7.1.0
string(19) "2014-10-08 15:14:32"
Output for 7.0.6
string(19) "2016-05-03 10:20:44"
Output for 7.0.5
string(19) "2016-04-02 23:07:33"
Output for 7.0.4
string(19) "2016-03-10 09:43:28"
Output for 7.0.3
string(19) "2016-03-18 10:23:11"
Output for 7.0.2
string(19) "2016-03-22 16:21:45"
Output for 7.0.1
string(19) "2016-03-23 20:57:30"
Output for 7.0.0
string(19) "2016-03-26 22:29:51"
Output for 5.6.21
string(19) "2016-05-02 05:40:20"
Output for 5.6.20
string(19) "2016-04-09 22:06:58"
Output for 5.6.19
string(19) "2016-03-07 17:51:01"
Output for 5.6.18
string(19) "2016-03-15 01:56:38"
Output for 5.6.17
string(19) "2016-03-19 14:37:00"
Output for 5.6.16
string(19) "2016-03-28 00:21:10"
Output for 5.6.15
string(19) "2016-03-29 01:22:18"
Output for 5.6.14
string(19) "2016-04-02 03:41:25"
Output for 5.6.13
string(19) "2016-04-15 07:35:43"
Output for 5.6.12
string(19) "2016-04-19 21:23:53"
Output for 5.6.11
string(19) "2016-04-23 04:25:55"
Output for 5.6.10
string(19) "2016-04-25 06:10:43"
Output for 5.6.9
string(19) "2016-04-27 11:09:32"
Output for 5.6.8
string(19) "2016-04-29 19:18:00"
Output for 5.5.35
string(19) "2016-05-22 09:28:10"
Output for 5.5.34
string(19) "2016-04-11 00:26:25"
Output for 5.5.33
string(19) "2016-03-08 20:47:58"
Output for 5.5.32
string(19) "2016-03-17 03:30:45"
Output for 5.5.31
string(19) "2016-03-20 17:22:19"
Output for 5.5.30
string(19) "2016-04-01 03:18:59"
Output for 5.5.29
string(19) "2016-04-16 21:42:50"
Output for 5.5.28
string(19) "2016-04-21 00:39:27"
Output for 5.5.27
string(19) "2016-04-22 02:57:18"
Output for 5.5.26
string(19) "2016-04-26 08:37:04"
Output for 5.5.25
string(19) "2016-04-28 14:55:42"
Output for 5.5.24
string(19) "2016-05-23 22:16:11"
Output for 5.4.45
string(19) "2015-09-21 14:42:04"
Output for 5.4.44
string(19) "2015-08-17 05:43:54"
Output for 5.4.43
string(19) "2015-08-17 05:43:50"
Output for 5.4.42
string(19) "2015-07-09 03:26:06"
Output for 5.4.41
string(19) "2015-07-09 03:26:04"
Output for 5.4.39 - 5.4.40
string(19) "2015-07-09 03:25:59"
Output for 5.4.38
string(19) "2015-03-15 17:34:24"
Output for 5.4.36 - 5.4.37
string(19) "2015-03-15 17:34:17"
Output for 5.4.34 - 5.4.35
string(19) "2015-03-15 17:34:16"
Output for 5.4.19 - 5.4.32
string(19) "2014-10-08 15:14:36"
Output for 5.3.27 - 5.4.18
string(19) "2014-10-08 15:14:37"
Output for 5.3.5 - 5.3.26
string(19) "2014-10-08 15:14:38"
Output for 5.2.0 - 5.3.4
string(19) "2014-10-08 15:14:39"
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/kHWtQ on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/kHWtQ on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/kHWtQ on line 3