protected static function matchToken($key, $token)
    {
        if ($token === '{n}') {
            return is_numeric($key);
        }
        if ($token === '{s}') {
            return is_string($key);
        }
        if (is_numeric($token)) {
            return ($key == $token);
        }

        return ($key === $token);
    }
protected static function matchToken($key, $token)
    {
        if ($token === '{n}') {
            return is_numeric($key);
        }
        if ($token === '{s}') {
            return is_string($key);
        }
        if (is_numeric($token)) {
            return ($key == $token);
        }

        return ($key === $token);
    }
protected static function matchToken ( $ key , $ token ) { if ( $ token === '{n}' ) { return is_numeric ( $ key ) ; } if ( $ token === '{s}' ) { return is_string ( $ key ) ; } if ( is_numeric ( $ token ) ) { return ( $ key == $ token ) ; } return ( $ key === $ token ) ; }
Check a key against a token.

@param string $key The key in the array being searched.
@param string $token The token being matched.

@return bool
Check a key against a token .