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'; } public function __clone() { $this->dateTime = clone $this->dateTime; } } $obj1 = new Foo(); $obj2 = clone $obj1; $obj1->string = 'foo bar'; $obj1->dateTime->m(new \DateInterval('P1Y')); var_dump($obj1->dateTime->format('Y-m-d')); var_dump($obj1->string); var_dump($obj2->dateTime->format('Y-m-d')); var_dump($obj2->string);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined method DateTime::m() in /in/uoipu:21 Stack trace: #0 {main} thrown in /in/uoipu on line 21
Process exited with code 255.

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:
35.05 ms | 401 KiB | 8 Q