3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); var_dump($date->format('d-m-Y H:i:s'));
based on Mogaf
Output for 5.6.28, 7.0.14 - 7.1.0
string(19) "15-08-2014 14:24:26"
Output for 7.0.6
string(19) "03-05-2016 17:19:06"
Output for 7.0.5
string(19) "03-04-2016 05:48:01"
Output for 7.0.4
string(19) "10-03-2016 17:29:22"
Output for 7.0.3
string(19) "18-03-2016 18:15:57"
Output for 7.0.2
string(19) "23-03-2016 00:32:12"
Output for 7.0.1
string(19) "24-03-2016 04:28:21"
Output for 7.0.0
string(19) "27-03-2016 06:24:57"
Output for 5.6.21
string(19) "02-05-2016 12:29:21"
Output for 5.6.20
string(19) "10-04-2016 04:46:28"
Output for 5.6.19
string(19) "08-03-2016 01:37:33"
Output for 5.6.18
string(19) "15-03-2016 10:09:17"
Output for 5.6.17
string(19) "19-03-2016 22:02:05"
Output for 5.6.16
string(19) "28-03-2016 07:12:28"
Output for 5.6.15
string(19) "29-03-2016 08:03:34"
Output for 5.6.14
string(19) "02-04-2016 09:58:16"
Output for 5.6.13
string(19) "15-04-2016 14:18:04"
Output for 5.6.12
string(19) "20-04-2016 04:45:23"
Output for 5.6.11
string(19) "24-04-2016 10:58:03"
Output for 5.6.10
string(19) "25-04-2016 13:11:21"
Output for 5.6.9
string(19) "27-04-2016 18:20:25"
Output for 5.6.8
string(19) "30-04-2016 03:13:00"
Output for 5.5.35
string(19) "22-05-2016 18:34:16"
Output for 5.5.34
string(19) "11-04-2016 06:59:57"
Output for 5.5.33
string(19) "09-03-2016 04:16:18"
Output for 5.5.32
string(19) "17-03-2016 13:53:47"
Output for 5.5.31
string(19) "21-03-2016 00:58:09"
Output for 5.5.30
string(19) "01-04-2016 09:56:29"
Output for 5.5.29
string(19) "17-04-2016 04:42:53"
Output for 5.5.28
string(19) "21-04-2016 07:56:52"
Output for 5.5.27
string(19) "22-04-2016 09:49:03"
Output for 5.5.26
string(19) "26-04-2016 15:52:49"
Output for 5.5.25
string(19) "28-04-2016 22:44:03"
Output for 5.5.24
string(19) "24-05-2016 05:23:51"
Output for 5.4.45
string(19) "09-09-2015 19:44:39"
Output for 5.4.44
string(19) "09-08-2015 20:21:00"
Output for 5.4.43
string(19) "09-08-2015 20:20:55"
Output for 5.4.42
string(19) "09-08-2015 20:20:53"
Output for 5.4.41
string(19) "09-08-2015 20:20:51"
Output for 5.4.40
string(19) "13-05-2015 22:56:19"
Output for 5.4.39
string(19) "13-05-2015 22:56:18"
Output for 5.4.38
string(19) "22-02-2015 16:49:51"
Output for 5.4.36 - 5.4.37
string(19) "03-02-2015 17:19:46"
Output for 5.4.35
string(19) "14-11-2014 11:44:34"
Output for 5.4.34
string(19) "13-11-2014 14:31:40"
Output for 5.3.29, 5.4.32
string(19) "28-08-2014 11:06:04"
Output for 5.4.24 - 5.4.31
string(19) "15-08-2014 14:24:31"
Output for 5.4.2 - 5.4.23
string(19) "15-08-2014 14:24:32"
Output for 5.3.11 - 5.3.28, 5.4.0 - 5.4.1
string(19) "15-08-2014 14:24:33"
Output for 5.2.6 - 5.3.10
string(19) "15-08-2014 14:24:34"
Output for 5.2.0 - 5.2.5
string(19) "15-08-2014 14:24:35"
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/KXt5j 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/KXt5j 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/KXt5j on line 2