php - Function pointer to static class member?
Get the solution ↓↓↓Solution:
Two options:
call_user_func("A::Method");
$func = function () { return A::Method(); }; echo $func()
It's planned (but it's subject to change) to be able to do this with reflection in the next version of PHP:
$srm = new ReflectionMethod('A::Method');
$func = $srm->getClosure();
$func();
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: invalid argument supplied for foreach() laravel
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.