method_exists 与 is_called

method_exists ,不关注是否为 protected, private, 存在就返回true, 同时不会触发 魔术方法 __call,依然返回 false,

is_called, 验证回调结构是否能有效,只有public可访问性的返回 True,protected和private返回false, 会触发 __call()魔术方法,返回ture,


is_called,第二个参数,如果 回调结构是函数,设置为false,如果回调结构是[对象,方法] 或者 [类,方法]的数组结构,设置为 true

原文地址:https://www.cnblogs.com/echojson/p/12752744.html