3v4l.org

run code in 300+ PHP versions simultaneously
<?php class _ { private function __destruct() {new self;} } class __ { private $f; public function __construct(&$f) { $this->f = &$f; } public function __destruct() { $this->f = function(){new _;}; } } $f = function () use (&$f) { $t = new __($f); echo "All is good"; }; $f(); $f();
Output for git.master, git.master_jit, rfc.property-hooks
All is good Fatal error: Uncaught Error: Call to private _::__destruct() from scope __ in /in/puQYJ:18 Stack trace: #0 /in/puQYJ(29): __->{closure}() #1 {main} thrown in /in/puQYJ on line 18
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:
40.96 ms | 401 KiB | 8 Q