public static PhpValue call_user_func(Context ctx, IPhpCallable function, params PhpValue[] args)
{
if (function == null)
{
//PhpException.ArgumentNull("function");
//return null;
throw new ArgumentNullException(); // NOTE: should not be reached, runtime converts NULL to InvalidCallback instance
}
Debug.Assert(args != null);
// invoke the callback:
return function.Invoke(ctx, args);
}