IsCustomFunction
Determine whether a given object is a custom function.
Method Signature
IsCustomFunction(object=[any], type=[string])Arguments
Argument
Type
Required
Description
Default
object
any
true
The value to test for closure-ness.
type
string
false
Check for a specific type of custom function - UDF, Lambda, or Closure.
Examples
isCustomFunction Example
Here we've example to check the given variable is user defined function or not.
function myfunc() {
return 1;
}
writeDump( isCustomFunction( myfunc ) );
Result: YES
isCustomFunction Example
Here we've example to check the given variable is user defined function or not.
Result: NO
Additional Examples
Related
Last updated
Was this helpful?
