3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_exception_handler(function (Throwable $exception) { var_dump($exception->getTrace()); }); class Foo { private $foo; public function __toString() { return $this->foo; } } sprintf('%s', new Foo());
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(4) { ["function"]=> string(10) "__toString" ["class"]=> string(3) "Foo" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [1]=> array(4) { ["file"]=> string(9) "/in/lJ61X" ["line"]=> int(17) ["function"]=> string(7) "sprintf" ["args"]=> array(2) { [0]=> string(2) "%s" [1]=> object(Foo)#2 (1) { ["foo":"Foo":private]=> NULL } } } }

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:
31.94 ms | 406 KiB | 5 Q