/// <summary> /// Verifies that the contents of a variable can be called as a function. /// </summary> /// <param name="ctx">Runtime context.</param> /// <param name="variable">The variable.</param> /// <param name="syntaxOnly">If <B>true</B>, it is only checked that has <pararef name="variable"/> /// a valid structure to be used as a callback. if <B>false</B>, the existence of the function (or /// method) is also verified.</param> /// <returns><B>true</B> if <paramref name="variable"/> denotes a function, <B>false</B> /// otherwise.</returns> public static bool is_callable(Context ctx, IPhpCallable variable, bool syntaxOnly = false) { return(syntaxOnly ? PhpVariable.IsValidCallback(variable) : PhpVariable.IsValidBoundCallback(ctx, variable)); }