3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Simple { private $complicated; public function setComplicated(Complicated $complicated) { $this->complicated = $complicated; } public function __construct() { echo 'test1 '; } public function __destruct() { echo 'exit1 '; } } //Допустим есть еще некий класс Complicated, который может в себе содержать ссылку на класс Simple. class Complicated { private $simple; public function setSimple(Simple $simple) { $this->simple = $simple; } public function __construct() { echo 'test2 '; } public function __destruct() { echo 'exit2 '; } } $simple = new Simple(); $complicated = new Complicated(); $simple->setComplicated($complicated); $complicated->setSimple($simple); unset($simple); unset($complicated); echo 'end';
Output for git.master, git.master_jit, rfc.property-hooks
test1 test2 endexit1 exit2

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