[Fix] is_callable should respect __call and __callStatic
Summary:
is_callable didnt check for __call, or __callStatic. It also didnt handle all
the possible array formats. Since I'd recently updated call_user_func etc to go
through a common routine to handle that, I decided to point is_callable at the
same code.
The one problem is that is_callable respects private and protected, where
currently call_user_func etc do not. I will fix that in a later diff, but for
now, I've added flags to CallInfo to indicate that its private or protected, and
when is_callable finds a private or protected method, it uses ClassInfo to
determine whether its accessible (this isnt very efficient, but its no worse
than it used to be).
Test Plan: fast_tests slow_tests
Reviewers: qigao, myang
Reviewed By: myang
CC: ps, mwilliams, myang
Differential Revision: 343168
Task ID: 740787
13 files changed: