3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function foo() { print "in Test->foo()\n"; } public static function bar() { print "in Test::bar()\n"; } public function __call($name, $args) { throw new Exception("failed to call Test->".$name."()\n"); } public static function __callStatic($name, $args) { throw new Exception("failed to call Test::".$name."()\n"); } } $foo = new Test(); $foo->foo(); $foo::bar(); try { $foo->foz(); } catch (Exception $e) { print $e->getMessage(); } try { $foo::baz(); } catch (Exception $e) { print $e->getMessage(); }
Output for git.master, git.master_jit, rfc.property-hooks
in Test->foo() in Test::bar() failed to call Test->foz() failed to call Test::baz()

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:
39.22 ms | 401 KiB | 8 Q