3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTimeImmutable('now'); $date->modify('-10 days'); var_dump($date);
Output for 7.1.0
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2014-07-04 16:24:32.004014" ["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 16:24:32.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 00:34:23.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 14:07:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.4
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-09 23:05:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.3
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-17 23:30:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.2
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-21 10:13:05.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 09:52:19.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 12:56:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for hhvm-3.12.0
object(DateTimeImmutable)#1 (1) { ["data":"DateTimeImmutable":private]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-11 02:45:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }
Output for hhvm-3.10.0
object(DateTimeImmutable)#1 (1) { ["data":"DateTimeImmutable":private]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-29 17:16:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }
Output for 5.6.21
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-05-01 19:39:36.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 09:22:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.19
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-06 20:31:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.18
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-14 08:59:47.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 04:05:59.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 14:40:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.15
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-28 15:39:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.14
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-01 18:21:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.13
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-14 22:18:26.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 11:22:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.11
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-22 18:40:24.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.10
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-24 20:18:54.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 01:23:45.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 08:57:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.7
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-05-24 18:49:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.35
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-05-21 22:53:14.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 15:10:30.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 10:17:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.32
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-15 19:18:57.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 07:00:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.30
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-03-31 17:44:11.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 12:21:22.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 14:32:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.27
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-21 17:11:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.26
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-25 22:33:32.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 04:40:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.24
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2016-04-30 12:19:05.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/rv5Fr on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/rv5Fr on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/rv5Fr on line 3