3v4l.org

run code in 300+ PHP versions simultaneously
<?php // http://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods class Foo { public function __call($name, $arguments) { echo "Calling object method '$name' " . implode(', ', $arguments). "\n"; } public function bar(int $i) { echo "bar($i)\n"; } } $foo = new Foo(); $foo->bar(123); $foo->bar("abc");
Output for git.master, git.master_jit, rfc.property-hooks
bar(123) Fatal error: Uncaught TypeError: Foo::bar(): Argument #1 ($i) must be of type int, string given, called in /in/MEqDv on line 17 and defined in /in/MEqDv:10 Stack trace: #0 /in/MEqDv(17): Foo->bar('abc') #1 {main} thrown in /in/MEqDv on line 10
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:
95.87 ms | 406 KiB | 5 Q