3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); function callbackFunction() {} class Foo { public function applyA(callable $errorCallback = null, bool $showProgress) {} public function applyB(stdClass $object = null, bool $showProgress) {} public function applyC($withoutTypeDeclaration = null, bool $showProgress) {} } $foo = new Foo; $foo->applyA('callbackFunction', true); $foo->applyB(new stdClass, true); $foo->applyC(new stdClass, true);

preferences:
25.97 ms | 404 KiB | 5 Q