3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print_r(DateTime::createFromFormat('Y-m-d', '2014-07-17')); print_r(DateTime::createFromFormat('d/m/Y', '17/07/2014'));
based on SnV9e
Output for 5.6.28, 7.0.14 - 7.1.0
DateTime Object ( [date] => 2014-07-17 10:56:50.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 10:56:50.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.6
DateTime Object ( [date] => 2014-07-17 08:32:37.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 08:32:37.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.5
DateTime Object ( [date] => 2014-07-17 21:28:34.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 21:28:34.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.4
DateTime Object ( [date] => 2014-07-17 07:49:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 07:49:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.3
DateTime Object ( [date] => 2014-07-17 08:23:10.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 08:23:10.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.2
DateTime Object ( [date] => 2014-07-17 14:08:53.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 14:08:53.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.1
DateTime Object ( [date] => 2014-07-17 19:10:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 19:10:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.0
DateTime Object ( [date] => 2014-07-17 20:45:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 20:45:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.21
DateTime Object ( [date] => 2014-07-17 03:52:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 03:52:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.20
DateTime Object ( [date] => 2014-07-17 20:22:24.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 20:22:24.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.19
DateTime Object ( [date] => 2014-07-17 15:56:52.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 15:56:52.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.18
DateTime Object ( [date] => 2014-07-17 23:42:38.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 23:42:38.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.17
DateTime Object ( [date] => 2014-07-17 12:41:17.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 12:41:17.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.16
DateTime Object ( [date] => 2014-07-17 22:31:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 22:31:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.15
DateTime Object ( [date] => 2014-07-17 23:24:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 23:24:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.14
DateTime Object ( [date] => 2014-07-17 01:57:59.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 01:57:59.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.13
DateTime Object ( [date] => 2014-07-17 05:53:44.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 05:53:44.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.12
DateTime Object ( [date] => 2014-07-17 19:32:45.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 19:32:45.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.11
DateTime Object ( [date] => 2014-07-17 02:39:02.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 02:39:02.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.10
DateTime Object ( [date] => 2014-07-17 04:22:32.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 04:22:32.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.9
DateTime Object ( [date] => 2014-07-17 09:20:03.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 09:20:03.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.8
DateTime Object ( [date] => 2014-07-17 17:21:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 17:21:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.7
DateTime Object ( [date] => 2014-07-17 12:29:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 12:29:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.35
DateTime Object ( [date] => 2014-07-17 07:35:41.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 07:35:41.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.34
DateTime Object ( [date] => 2014-07-17 22:45:18.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 22:45:18.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.33
DateTime Object ( [date] => 2014-07-17 18:45:38.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 18:45:38.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.32
DateTime Object ( [date] => 2014-07-17 01:34:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 01:34:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.31
DateTime Object ( [date] => 2014-07-17 15:27:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 15:27:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.30
DateTime Object ( [date] => 2014-07-17 01:32:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 01:32:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.29
DateTime Object ( [date] => 2014-07-17 19:59:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 19:59:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.28
DateTime Object ( [date] => 2014-07-17 22:38:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 22:38:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.27
DateTime Object ( [date] => 2014-07-17 01:09:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 01:09:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.26
DateTime Object ( [date] => 2014-07-17 06:48:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 06:48:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.25
DateTime Object ( [date] => 2014-07-17 12:52:18.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 12:52:18.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.24
DateTime Object ( [date] => 2014-07-17 19:54:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 19:54:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.45
DateTime Object ( [date] => 2014-07-17 14:20:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 14:20:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.44
DateTime Object ( [date] => 2014-07-17 14:20:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 14:20:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.43
DateTime Object ( [date] => 2014-07-17 14:19:58.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 14:19:58.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.42
DateTime Object ( [date] => 2014-07-17 14:19:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 14:19:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.41
DateTime Object ( [date] => 2014-07-17 14:19:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 14:19:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.40
DateTime Object ( [date] => 2014-07-17 14:19:52.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 14:19:52.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.39
DateTime Object ( [date] => 2014-07-17 14:19:49.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 14:19:49.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.38
DateTime Object ( [date] => 2014-07-17 05:27:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 05:27:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.37
DateTime Object ( [date] => 2014-07-17 05:27:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 05:27:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.34 - 5.4.36
DateTime Object ( [date] => 2014-07-17 05:27:21.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 05:27:21.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.32
DateTime Object ( [date] => 2014-07-17 10:56:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 10:56:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.30 - 5.4.31
DateTime Object ( [date] => 2014-07-17 10:56:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 10:56:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.12 - 5.4.29
DateTime Object ( [date] => 2014-07-17 10:56:55 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 10:56:55 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.22 - 5.4.11
DateTime Object ( [date] => 2014-07-17 10:56:56 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 10:56:56 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.2 - 5.3.21
DateTime Object ( [date] => 2014-07-17 10:56:57 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 10:56:57 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.0 - 5.3.1
DateTime Object ( [date] => 2014-07-17 10:56:58 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-17 10:56:58 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.2.10 - 5.2.17
Fatal error: Call to undefined method DateTime::createFromFormat() in /in/29vGp 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/29vGp on line 2
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/29vGp on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'datetime' in /in/29vGp on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'datetime' in /in/29vGp on line 2