3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime("wat"); var_dump($dt); var_dump($dt->getLastErrors());
based on AatXv
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 00:09:18.004010" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 00:09:18.052291" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 00:09:18.002439" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 00:09:18.011481" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 00:09:18.007892" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 00:09:18.004025" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.0.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 00:09:18.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.0.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-03 08:14:38.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.0.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-02 21:11:19.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.0.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 07:28:38.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.0.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 08:01:35.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.0.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-22 13:47:02.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.0.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 18:47:14.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 7.0.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-26 20:27:24.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 03:34:22.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-09 20:03:22.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-07 15:35:36.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-14 23:21:23.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-19 12:19:59.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 22:13:07.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 23:06:03.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-02 01:40:19.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 05:35:41.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-19 19:13:22.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-23 02:13:29.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 04:03:27.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 09:00:27.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 17:01:40.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.6.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-25 11:32:09.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-22 07:15:54.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 22:27:48.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 18:24:56.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 01:12:51.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 15:06:45.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 01:14:28.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-16 19:40:50.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 22:18:52.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 00:49:47.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 06:29:23.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-28 12:32:40.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.5.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-23 19:28:26.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.45
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-16 15:13:25.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.44
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-16 15:13:26.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.43
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-16 15:13:27.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.41 - 5.4.42
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-16 15:13:28.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.39 - 5.4.40
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-16 15:13:29.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.36 - 5.4.38
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-16 15:13:30.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.34 - 5.4.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-16 15:13:31.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.31 - 5.4.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-16 15:13:32.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-16 15:13:33.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.28 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-16 15:13:33" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.25 - 5.4.27
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-16 15:13:34" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.3.28, 5.4.22 - 5.4.24
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-16 15:13:35" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.4.19 - 5.4.21
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-16 15:13:36" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.18
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-16 15:13:37" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.3.22 - 5.3.25, 5.4.12 - 5.4.15
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-16 15:13:38" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.3.18 - 5.3.21, 5.4.9 - 5.4.11
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-16 15:13:39" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.3.17, 5.4.7 - 5.4.8
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-16 15:13:40" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }
Output for 5.3.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-16 15:13:32" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "WAT" } array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }