3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo DateTime::createFromFormat('Y-m-d', '2014-01-01')->format('Y-m-d H:i:s');
based on 3XMgJ
Output for 5.6.28, 7.0.14 - 7.1.0
2014-01-01 09:50:42
Output for 7.0.6
2014-01-01 08:03:22
Output for 7.0.5
2014-01-01 21:00:29
Output for 7.0.4
2014-01-01 07:16:36
Output for 7.0.3
2014-01-01 07:48:42
Output for 7.0.2
2014-01-01 13:33:56
Output for 7.0.1
2014-01-01 18:35:44
Output for 7.0.0
2014-01-01 20:16:14
Output for 5.6.21
2014-01-01 03:22:37
Output for 5.6.20
2014-01-01 19:50:26
Output for 5.6.19
2014-01-01 15:22:28
Output for 5.6.18
2014-01-01 23:07:52
Output for 5.6.17
2014-01-01 12:07:05
Output for 5.6.16
2014-01-01 22:01:33
Output for 5.6.15
2014-01-01 22:54:43
Output for 5.6.14
2014-01-01 01:29:10
Output for 5.6.13
2014-01-01 05:24:38
Output for 5.6.12
2014-01-01 19:00:46
Output for 5.6.11
2014-01-01 02:00:01
Output for 5.6.10
2014-01-01 03:51:16
Output for 5.6.9
2014-01-01 08:48:36
Output for 5.6.8
2014-01-01 16:48:58
Output for 5.6.7
2014-01-01 10:56:18
Output for 5.5.35
2014-01-01 07:04:05
Output for 5.5.34
2014-01-01 22:16:54
Output for 5.5.33
2014-01-01 18:12:20
Output for 5.5.32
2014-01-01 00:59:30
Output for 5.5.31
2014-01-01 14:54:17
Output for 5.5.30
2014-01-01 01:03:09
Output for 5.5.29
2014-01-01 19:29:36
Output for 5.5.28
2014-01-01 22:06:50
Output for 5.5.27
2014-01-01 00:37:19
Output for 5.5.26
2014-01-01 06:17:08
Output for 5.5.25
2014-01-01 12:20:25
Output for 5.5.24
2014-01-01 19:15:38
Output for 5.4.45
2014-01-01 13:43:43
Output for 5.4.44
2014-01-01 13:43:33
Output for 5.4.43
2014-01-01 13:43:16
Output for 5.4.42
2014-01-01 13:43:09
Output for 5.4.41
2014-01-01 13:43:00
Output for 5.4.40
2014-01-01 13:42:51
Output for 5.4.39
2014-01-01 13:42:44
Output for 5.4.38
2014-01-01 18:03:29
Output for 5.4.35 - 5.4.37
2014-01-01 18:03:21
Output for 5.4.34
2014-01-01 18:03:20
Output for 5.4.15 - 5.4.32
2014-01-01 09:50:46
Output for 5.3.25 - 5.4.14
2014-01-01 09:50:47
Output for 5.3.6 - 5.3.24
2014-01-01 09:50:48
Output for 5.3.0 - 5.3.5
2014-01-01 09:50:49
Output for 5.2.10 - 5.2.17
Fatal error: Call to undefined method DateTime::createFromFormat() in /in/GbIQn on line 3
Process exited with code 255.
Output for 5.2.0 - 5.2.9
Fatal error: Call to undefined method DateTime::createfromformat() in /in/GbIQn on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/GbIQn on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/GbIQn on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/GbIQn on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/GbIQn on line 3
Process exited with code 255.