<?php class A { private function foo() { echo 'foo'; } public function bar(callable $call) { $call(); } } $a = new A; // A::foo is not callable here, but will be when we get inside A::bar var_dump(is_callable([$a, 'foo'] )); $a->bar( [$a, 'foo'] );
You have javascript disabled. You will not be able to edit any code.