3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; use Bar\B; class A { public function foo(): Closure { $b = new B(); return function() use ($b) { $b->bar(); }; } } namespace Bar; use Buzz\ImportedException; class B { public function bar() { throw new ImportedException(); } } namespace Buzz; use \Exception; class ImportedException extends Exception { } $a = new A(); $closure = $a->foo(); $closure();
Output for git.master_jit, git.master, rfc.property-hooks
Fatal error: Uncaught Error: Class "Buzz\A" not found in /in/huv3k:33 Stack trace: #0 {main} thrown in /in/huv3k on line 33
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:
61.51 ms | 401 KiB | 8 Q