3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = DateTime::createFromFormat('Y-m-d', '2012-10-17'); var_dump($date->format('Y-m-d H:i:s'));
Output for 5.4.20, 5.6.28, 7.0.14 - 7.1.0
string(19) "2012-10-17 10:32:15"
Output for 7.0.6
string(19) "2012-10-17 23:43:17"
Output for 7.0.5
string(19) "2012-10-17 13:19:04"
Output for 7.0.4
string(19) "2012-10-17 22:11:02"
Output for 7.0.3
string(19) "2012-10-17 22:34:13"
Output for 7.0.2
string(19) "2012-10-17 09:18:44"
Output for 7.0.1
string(19) "2012-10-17 08:56:51"
Output for 7.0.0
string(19) "2012-10-17 12:08:09"
Output for hhvm-3.12.0
string(19) "2012-10-17 01:27:29"
Output for hhvm-3.10.0
string(19) "2012-10-17 15:48:31"
Output for 5.6.21
string(19) "2012-10-17 18:49:21"
Output for 5.6.20
string(19) "2012-10-17 08:35:57"
Output for 5.6.19
string(19) "2012-10-17 19:19:55"
Output for 5.6.18
string(19) "2012-10-17 07:33:17"
Output for 5.6.17
string(19) "2012-10-17 03:10:40"
Output for 5.6.16
string(19) "2012-10-17 13:50:28"
Output for 5.6.15
string(19) "2012-10-17 14:42:53"
Output for 5.6.14
string(19) "2012-10-17 17:33:25"
Output for 5.6.13
string(19) "2012-10-17 21:30:33"
Output for 5.6.12
string(19) "2012-10-17 10:30:58"
Output for 5.6.11
string(19) "2012-10-17 17:51:30"
Output for 5.6.10
string(19) "2012-10-17 19:29:06"
Output for 5.6.9
string(19) "2012-10-17 00:26:26"
Output for 5.6.8
string(19) "2012-10-17 08:07:06"
Output for 5.6.7
string(19) "2012-10-17 17:37:38"
Output for 5.5.35
string(19) "2012-10-17 21:57:26"
Output for 5.5.34
string(19) "2012-10-17 14:00:08"
Output for 5.5.33
string(19) "2012-10-17 09:17:48"
Output for 5.5.32
string(19) "2012-10-17 18:20:27"
Output for 5.5.31
string(19) "2012-10-17 06:05:02"
Output for 5.5.30
string(19) "2012-10-17 16:53:46"
Output for 5.5.29
string(19) "2012-10-17 11:28:41"
Output for 5.5.28
string(19) "2012-10-17 13:36:46"
Output for 5.5.27
string(19) "2012-10-17 16:22:15"
Output for 5.5.26
string(19) "2012-10-17 21:42:30"
Output for 5.5.25
string(19) "2012-10-17 03:47:44"
Output for 5.5.24
string(19) "2012-10-17 11:30:58"
Output for 5.4.45
string(19) "2012-10-17 23:32:45"
Output for 5.4.44
string(19) "2012-10-17 10:47:13"
Output for 5.4.43
string(19) "2012-10-17 10:47:09"
Output for 5.4.42
string(19) "2012-10-17 10:47:08"
Output for 5.4.41
string(19) "2012-10-17 10:47:06"
Output for 5.4.40
string(19) "2012-10-17 03:24:19"
Output for 5.4.39
string(19) "2012-10-17 03:24:18"
Output for 5.4.38
string(19) "2012-10-17 19:29:36"
Output for 5.4.37
string(19) "2012-10-17 06:11:52"
Output for 5.4.36
string(19) "2012-10-17 06:11:51"
Output for 5.4.35
string(19) "2012-10-17 23:28:32"
Output for 5.4.34
string(19) "2012-10-17 23:28:31"
Output for 5.4.32
string(19) "2012-10-17 18:49:19"
Output for 5.4.31
string(19) "2012-10-17 18:49:14"
Output for 5.3.29, 5.4.29 - 5.4.30
string(19) "2012-10-17 18:49:11"
Output for 5.3.28, 5.4.23, 5.4.28
string(19) "2012-10-17 18:49:10"
Output for 5.4.25 - 5.4.27
string(19) "2012-10-17 18:49:16"
Output for 5.4.24
string(19) "2012-10-17 18:49:15"
Output for 5.4.22
string(19) "2012-10-17 18:49:09"
Output for 5.4.21
string(19) "2012-10-17 18:49:08"
Output for 5.4.6 - 5.4.19
string(19) "2012-10-17 10:32:16"
Output for 5.3.19 - 5.3.27, 5.4.0 - 5.4.5
string(19) "2012-10-17 10:32:17"
Output for 5.3.4 - 5.3.18
string(19) "2012-10-17 10:32:18"
Output for 5.3.0 - 5.3.3
string(19) "2012-10-17 10:32:19"
Output for 5.2.10 - 5.2.17
Fatal error: Call to undefined method DateTime::createFromFormat() in /in/An2M8 on line 2
Process exited with code 255.
Output for 5.2.0 - 5.2.9
Fatal error: Call to undefined method DateTime::createfromformat() in /in/An2M8 on line 2
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/An2M8 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'datetime' in /in/An2M8 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'datetime' in /in/An2M8 on line 2