3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(DateTimeImmutable::createFromMutable(new DateTime)); var_dump(DateTimeImmutable::createFromMutable(new DateTimeImmutable));
based on qNCvl
Output for 7.2.0
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2015-09-24 12:40:07.004288" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.1.10
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2015-09-24 12:40:07.047722" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.1.7
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2015-09-24 12:40:07.005232" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.1.6
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2015-09-24 12:40:07.012218" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.1.5
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2015-09-24 12:40:07.029497" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.1.0
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2015-09-24 12:40:07.003980" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.28, 7.0.20
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2015-09-24 12:40:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.0.6
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-05-03 13:29:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.0.5
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-04-03 02:10:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.0.4
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-10 12:59:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.0.3
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-18 13:49:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.0.2
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-22 19:44:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.0.1
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-23 23:58:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 7.0.0
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-27 01:35:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.21
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-05-02 08:40:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.20
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-04-10 01:05:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.19
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-07 21:03:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.18
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-15 05:46:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.17
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-19 17:51:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.16
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-28 03:25:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.15
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-03-29 04:20:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.14
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-04-02 06:27:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.13
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-04-15 10:30:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.12
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-04-20 00:43:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.11
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-04-23 07:26:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.10
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-04-25 09:13:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.9
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-04-27 14:19:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.6.8
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2016-04-29 22:31:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in /in/sHrQ2 on line 4 NULL
Output for 5.5.24 - 5.5.35
Fatal error: Call to undefined method DateTimeImmutable::createFromMutable() in /in/sHrQ2 on line 3
Process exited with code 255.
Output for 5.3.18 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/sHrQ2 on line 3
Process exited with code 255.