Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find whether the type of a variable is string
<?php is_string(mixed $value): bool
<?php                     foreach ($httpVerbs as &$verbRoutes) {

                        foreach ($verbRoutes as &$route) {

                            if (

                                isset($route['handler']) && is_string($route['handler'])

                                && '__closure__' == substr($route['handler'], 0, 11)

                            ) {

                                $route['handler'] = unserialize(substr($route['handler'], 11));