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.248

Latest news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK