RT
功能1:
$class->$func()
Run Code Online (Sandbox Code Playgroud)
功能2:
//Simple callback
call_user_func($func)
//Static class method call
call_user_func(array($class,$func))
//Object method call
$class = new MyClass();
call_user_func(array($class, $func));
Run Code Online (Sandbox Code Playgroud)
有区别吗?我想看看源代码(https://github.com/php/php-src)我们应该做什么?
php ×1