wireIsCallable() function

Is the given $var callable as a function?

ProcessWire namespace aware version of PHP’s is_callable() function

Usage

// basic usage
$bool = wireIsCallable($var);

// usage with all arguments
$bool = wireIsCallable($var, bool $syntaxOnly = false);

Arguments

NameType(s)Description
varstring, callable
syntaxOnly (optional)bool

Return value

bool


Functions methods and properties

API reference based on ProcessWire core version 3.0.244

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer