3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTimeImmutable(); $date->setTime(0, 0, 0); print_r($date);
based on r9Mkd
Output for 7.2.0
DateTimeImmutable Object ( [date] => 2015-12-15 18:13:36.004429 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.10
DateTimeImmutable Object ( [date] => 2015-12-15 18:13:36.004155 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.7
DateTimeImmutable Object ( [date] => 2015-12-15 18:13:36.004621 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.6
DateTimeImmutable Object ( [date] => 2015-12-15 18:13:36.010881 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.5
DateTimeImmutable Object ( [date] => 2015-12-15 18:13:36.009770 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.0
DateTimeImmutable Object ( [date] => 2015-12-15 18:13:36.004013 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.28, 7.0.20
DateTimeImmutable Object ( [date] => 2015-12-15 18:13:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.6
DateTimeImmutable Object ( [date] => 2016-05-21 12:37:21.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.5
DateTimeImmutable Object ( [date] => 2016-04-03 08:46:09.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.4
DateTimeImmutable Object ( [date] => 2016-03-10 20:48:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.3
DateTimeImmutable Object ( [date] => 2016-03-18 22:09:09.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.2
DateTimeImmutable Object ( [date] => 2016-03-23 04:23:11.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.1
DateTimeImmutable Object ( [date] => 2016-03-24 07:35:00.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.0
DateTimeImmutable Object ( [date] => 2016-03-27 09:28:52.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.21
DateTimeImmutable Object ( [date] => 2016-05-02 15:37:12.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.20
DateTimeImmutable Object ( [date] => 2016-04-10 07:47:43.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.19
DateTimeImmutable Object ( [date] => 2016-03-08 04:57:05.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.18
DateTimeImmutable Object ( [date] => 2016-03-15 13:49:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.17
DateTimeImmutable Object ( [date] => 2016-03-20 01:23:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.16
DateTimeImmutable Object ( [date] => 2016-03-28 10:18:01.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.15
DateTimeImmutable Object ( [date] => 2016-03-29 11:07:27.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.14
DateTimeImmutable Object ( [date] => 2016-04-14 16:48:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.13
DateTimeImmutable Object ( [date] => 2016-04-15 17:28:42.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.12
DateTimeImmutable Object ( [date] => 2016-04-20 07:56:23.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.11
DateTimeImmutable Object ( [date] => 2016-04-24 14:21:51.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.10
DateTimeImmutable Object ( [date] => 2016-04-25 16:26:40.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.9
DateTimeImmutable Object ( [date] => 2016-04-27 21:34:48.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.8
DateTimeImmutable Object ( [date] => 2016-04-30 06:24:15.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.35
DateTimeImmutable Object ( [date] => 2016-05-23 01:04:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.34
DateTimeImmutable Object ( [date] => 2016-04-11 09:59:50.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.33
DateTimeImmutable Object ( [date] => 2016-03-09 07:53:53.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.32
DateTimeImmutable Object ( [date] => 2016-03-17 17:45:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.31
DateTimeImmutable Object ( [date] => 2016-03-21 04:31:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.30
DateTimeImmutable Object ( [date] => 2016-04-01 12:59:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.29
DateTimeImmutable Object ( [date] => 2016-04-17 07:46:24.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.28
DateTimeImmutable Object ( [date] => 2016-04-21 11:14:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.27
DateTimeImmutable Object ( [date] => 2016-04-22 12:54:45.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.26
DateTimeImmutable Object ( [date] => 2016-04-26 19:06:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.25
DateTimeImmutable Object ( [date] => 2016-04-29 02:31:32.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.24
DateTimeImmutable Object ( [date] => 2016-05-24 08:57:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.20 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/XpqY0 on line 3
Process exited with code 255.