IsCustomFunction()
Determines whether a name represents a custom function
IsCustomFunction( name=any, type=string );
Returns: Boolean
| Argument | Description |
|---|---|
|
name
any,
required
|
edit
Name of a custom function. Must not be in quotation marks. If not a defined variable or function name, Lucee generates an error. |
|
type
string,
optional
|
edit
Limit to a specific type:
If not specified, all custom function types are accepted. Introduced: 5.0.0.0 |
Examples
editwriteDump(isCustomFunction(realUDF));
writeDump(isCustomFunction(xxx));
testFun = realUDF;
X = 1;
writeDump(isCustomFunction(testFun));
writeDump(isCustomFunction(X))
function realUDF() {
return 1;
}
function xxx(void) {}
See also
- Components (CFCs)
- Decision logic
- IsClosure()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)