PHP Luminova: Calling PHP Functions with the Luminova Helper
Call a PHP function by name with `Luminova\Funcs\func()`, and organize application utilities in your own class.
func() resolves a PHP function by name, forwards its arguments, and returns the result. Define reusable application-specific static methods in app/Utils/Functions.php and call them through App\Utils\Functions.
use function Luminova\Funcs\func;
$normalized = func('strtoupper', 'ready');
echo $normalized; // READYFunction Definition
function func(string $function, mixed ...$arguments): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$function | callable-string | Function name. |
$arguments | mixed | Arguments forwarded to the function. |
Return:
mixed - Returns the function result.
Throws:
- RuntimeException if the function is unavailable or disabled.
Use the dedicated classes for IP addresses, filesystem operations, and math helpers.