3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = null; public function __construct() { $this->bar = new DateTime(); // Now $this->far = &$this->bar; } } $foo= new Foo(); var_dump($foo); $vars = get_object_vars($foo); $vars['bar'] = new DateTime('2014-03-25'); var_dump($foo);
Output for git.master
Deprecated: Creation of dynamic property Foo::$far is deprecated in /in/H7h4N on line 7 object(Foo)#1 (2) { ["bar"]=> &object(DateTime)#2 (3) { ["date"]=> string(26) "2016-10-14 09:59:42.003493" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["far"]=> &object(DateTime)#2 (3) { ["date"]=> string(26) "2016-10-14 09:59:42.003493" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } object(Foo)#1 (2) { ["bar"]=> &object(DateTime)#3 (3) { ["date"]=> string(26) "2014-03-25 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["far"]=> &object(DateTime)#3 (3) { ["date"]=> string(26) "2014-03-25 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }
Output for git.master_jit
Deprecated: Creation of dynamic property Foo::$far is deprecated in /in/H7h4N on line 7 object(Foo)#1 (2) { ["bar"]=> &object(DateTime)#2 (3) { ["date"]=> string(26) "2016-10-14 09:59:42.003747" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["far"]=> &object(DateTime)#2 (3) { ["date"]=> string(26) "2016-10-14 09:59:42.003747" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } object(Foo)#1 (2) { ["bar"]=> &object(DateTime)#3 (3) { ["date"]=> string(26) "2014-03-25 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["far"]=> &object(DateTime)#3 (3) { ["date"]=> string(26) "2014-03-25 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }
Output for rfc.property-hooks
Deprecated: Creation of dynamic property Foo::$far is deprecated in /in/H7h4N on line 7 object(Foo)#1 (2) { ["bar"]=> &object(DateTime)#2 (3) { ["date"]=> string(26) "2016-10-14 09:59:42.003782" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["far"]=> &object(DateTime)#2 (3) { ["date"]=> string(26) "2016-10-14 09:59:42.003782" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } object(Foo)#1 (2) { ["bar"]=> &object(DateTime)#3 (3) { ["date"]=> string(26) "2014-03-25 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["far"]=> &object(DateTime)#3 (3) { ["date"]=> string(26) "2014-03-25 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
53.87 ms | 403 KiB | 8 Q