3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); var_dump($date);
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-02-28 10:50:45.003906" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.28, 7.0.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-02-28 10:50:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 16:56:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 14:24:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.33, 5.6.18 - 5.6.19, hhvm-3.12.0, 7.0.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.31 - 5.5.32, 5.6.17, 7.0.1 - 7.0.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.15 - 5.6.16, hhvm-3.10.0, 7.0.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 19:23:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 11:27:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.45, 5.5.29 - 5.5.30, 5.6.13 - 5.6.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.44, 5.5.28, 5.6.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.41 - 5.4.43, 5.5.26 - 5.5.27, 5.6.10 - 5.6.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.24 - 5.5.25, 5.6.8 - 5.6.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.38 - 5.4.39, 5.5.23, 5.6.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.36 - 5.4.37, 5.5.21 - 5.5.22, 5.6.5 - 5.6.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.35, 5.5.18 - 5.5.20, 5.6.3 - 5.6.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.32 - 5.4.34, 5.5.16, 5.6.0 - 5.6.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-23 07:38:18.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-11 13:41:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.30 - 5.4.31, 5.5.14 - 5.5.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.26 - 5.4.28, 5.5.11 - 5.5.13
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:40" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.23 - 5.4.25, 5.5.8 - 5.5.10
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:41" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.28, 5.4.21 - 5.4.22, 5.5.6 - 5.5.7
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:42" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.19 - 5.4.20, 5.5.2 - 5.5.5
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:43" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.27, 5.4.16 - 5.4.18, 5.5.0 - 5.5.1
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:44" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.40
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 13:01:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.29, 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:39" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.24 - 5.3.26, 5.4.13 - 5.4.15
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:45" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.20 - 5.3.23, 5.4.11 - 5.4.12
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:46" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.18 - 5.3.19, 5.4.8 - 5.4.10
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:47" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.15 - 5.3.17, 5.4.5 - 5.4.7
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:48" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.12 - 5.3.14, 5.4.2 - 5.4.4
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:49" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.9 - 5.3.11, 5.4.0 - 5.4.1
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:50" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.4 - 5.3.8
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:51" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.2 - 5.3.3
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:52" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.0 - 5.3.1
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-03-09 13:01:53" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.2.0 - 5.2.17
object(DateTime)#1 (0) { }
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/iqXH3 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/iqXH3 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/iqXH3 on line 2