Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is an array
<?php is_array(mixed $value): bool
<?php function _checkTypehint(callable $callback, \Throwable $reason): bool

{

    if (\is_array($callback)) {

        $callbackReflection = new \ReflectionMethod($callback[0], $callback[1]);

    } elseif (\is_object($callback) && !$callback instanceof \Closure) {

        $callbackReflection = new \ReflectionMethod($callback, '__invoke');
<?php         if (\is_array($callback)) {

            $ref = new \ReflectionMethod($callback[0], $callback[1]);

        } elseif (\is_object($callback) && !$callback instanceof \Closure) {

            $ref = new \ReflectionMethod($callback, '__invoke');