isCallable.php
Table of Contents
Functions
- isCallable() : bool
- Checks whether a string can be resolved into a valid callable.
Functions
isCallable()
Checks whether a string can be resolved into a valid callable.
isCallable(string $callable) : bool
This is a convenience wrapper around resolveCallable() that returns a boolean
instead of the callable itself. Useful for validation or conditional logic.
Supports the same callable formats as resolveCallable():
- Fully qualified function names:
'oihana\core\normalize' - Static method notation:
'MyClass::method'or'MyNamespace\MyClass::method'
Parameters
- $callable : string
-
The callable as a string to check
Tags
Return values
bool —True if the callable can be resolved, false otherwise