3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { var $dateTime; var $string; public function __construct() { $this->dateTime = new \DateTime(); $this->string = 'foo'; } } $obj1 = new Foo(); $obj2 = clone $obj1; $obj1->string = 'foo bar'; $obj1->dateTime->add(new \DateInterval('P1D')); var_dump($obj1, $obj2);
Output for git.master
object(Foo)#1 (2) { ["dateTime"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-04 22:20:34.003805" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["string"]=> string(7) "foo bar" } object(Foo)#3 (2) { ["dateTime"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-04 22:20:34.003805" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["string"]=> string(3) "foo" }
Output for git.master_jit
object(Foo)#1 (2) { ["dateTime"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-04 22:20:34.003770" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["string"]=> string(7) "foo bar" } object(Foo)#3 (2) { ["dateTime"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-04 22:20:34.003770" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["string"]=> string(3) "foo" }
Output for rfc.property-hooks
object(Foo)#1 (2) { ["dateTime"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-04 22:20:34.003562" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["string"]=> string(7) "foo bar" } object(Foo)#3 (2) { ["dateTime"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-04 22:20:34.003562" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } ["string"]=> string(3) "foo" }

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:
84.93 ms | 402 KiB | 8 Q