3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Controller { public function myAction() { } public static function myStaticAction() { } } function test_callable(callable $callable) { var_export($callable); } test_callable(['Controller', 'myStaticAction']); test_callable(['Controller', 'myAction']); // Deprecated since PHP 7 test_callable(['Controller', 'notExistingMethod']); // Fatal error: Uncaught TypeError
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'Controller', 1 => 'myStaticAction', ) Fatal error: Uncaught TypeError: test_callable(): Argument #1 ($callable) must be of type callable, array given, called in /in/ORMQ3 on line 23 and defined in /in/ORMQ3:16 Stack trace: #0 /in/ORMQ3(23): test_callable(Array) #1 {main} thrown in /in/ORMQ3 on line 16
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:
34.14 ms | 401 KiB | 8 Q