3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace Test\Biz; class Foo { public function bar(callable $callable) { echo $callable; } } function demonstrate2(callable $callable) { } echo 'Function: '; echo demonstrate2('\Test\Biz\Foo::bar'); echo PHP_EOL . 'Method: '; (new Foo())->bar('\Test\Biz\Foo::bar');
Output for git.master, git.master_jit, rfc.property-hooks
Function: Fatal error: Uncaught TypeError: Test\Biz\demonstrate2(): Argument #1 ($callable) must be of type callable, string given, called in /in/4ibt7 on line 17 and defined in /in/4ibt7:13 Stack trace: #0 /in/4ibt7(17): Test\Biz\demonstrate2('\\Test\\Biz\\Foo::...') #1 {main} thrown in /in/4ibt7 on line 13
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:
44.34 ms | 1580 KiB | 4 Q