3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function __construct() { $this->b = new B($this); } public function __destruct() { echo 'c destructing!'; } } class B { public function __construct($C){ $this->c = $c; } public function __destruct() { echo 'b destructing!'; } } $c = new C; die();
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined variable $c in /in/kIRj1 on line 13 Deprecated: Creation of dynamic property B::$c is deprecated in /in/kIRj1 on line 13 Deprecated: Creation of dynamic property C::$b is deprecated in /in/kIRj1 on line 4 c destructing!b destructing!

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