3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { public function fooBar(Foo $foo) { $something = $foo->toArray(); } } class ChildClass extends ParentClass { public function fooBar(Foo $foo = null) { $something = $foo->toArray(); } } $caller = new ChildClass; $caller->foobar();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to a member function toArray() on null in /in/FSXgR:15 Stack trace: #0 /in/FSXgR(20): ChildClass->fooBar() #1 {main} thrown in /in/FSXgR on line 15
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:
30.2 ms | 405 KiB | 5 Q