3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTimeImmutable(); var_dump($date);
Output for 7.1.0
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2014-07-04 13:49:42.004022" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.28, 7.0.14
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2014-07-04 13:49:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.6
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-05-03 09:34:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.5
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-02 22:27:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.4
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-10 08:58:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.3
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-18 09:36:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.2
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-22 15:29:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.1
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-23 20:16:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.0
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-26 21:48:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.21
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-05-02 04:56:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.20
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-09 21:24:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.19
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-07 17:07:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.18
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-15 01:00:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.17
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-19 13:51:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.16
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-27 23:34:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.15
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-29 00:39:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.14
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-02 02:59:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.13
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-15 06:54:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.12
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-19 20:38:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.11
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-23 03:42:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.10
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-25 05:26:18.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.9
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-27 10:24:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.8
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-29 18:29:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.35
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-05-22 08:40:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.34
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-10 23:44:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.33
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-08 20:04:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.32
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-17 02:44:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.31
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-20 16:37:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.30
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-01 02:34:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.29
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-16 20:59:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.28
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-20 23:44:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.27
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-22 02:13:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.26
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-26 07:53:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.25
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-28 14:11:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.24
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-05-23 21:22:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.0.0 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/kFTaK on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/kFTaK on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/kFTaK on line 2