3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public function method() { } } class B extends A { public function method() { } } class C { public function method() { } } class D { } $fn = Closure::fromCallable([new A, 'method']); $fn->call(new B); // error $fn->call(new C); // error $fn->call(new D); // error ?>
Output for rfc.property-hooks, git.master, git.master_jit
Warning: Cannot rebind scope of closure created from method in /in/stFK6 on line 18 Warning: Cannot bind method A::method() to object of class C in /in/stFK6 on line 19 Warning: Cannot bind method A::method() to object of class D in /in/stFK6 on line 20

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:
46.98 ms | 2800 KiB | 4 Q