3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar; function __construct($bar) { $this->bar = $bar; } function __destruct() { echo __METHOD__,"\n"; unset($this->bar); } } class Bar { function __destruct() { echo __METHOD__,"\n"; unset($this->bar); } } class Baz { function __destruct() { echo __METHOD__,"\n"; unset($this->bar); } } $e = 1; $f = 0; $y = new Bar(); $z = new Baz(); echo 'a'; $u = $e / $f; echo 'b'; $x = new Foo($y); echo 'c'; ?>
Output for git.master, git.master_jit, rfc.property-hooks
a Fatal error: Uncaught DivisionByZeroError: Division by zero in /in/qGCdq:32 Stack trace: #0 {main} thrown in /in/qGCdq on line 32 Baz::__destruct Bar::__destruct
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:
64.76 ms | 401 KiB | 8 Q