protected static function _matchToken($key, $token)
    {
        switch ($token) {
            case '{n}':
                return is_numeric($key);
            case '{s}':
                return is_string($key);
            case '{*}':
                return true;
            default:
                return is_numeric($token) ? ($key == $token) : $key === $token;
        }
    }
protected static function _matchToken($key, $token)
    {
        switch ($token) {
            case '{n}':
                return is_numeric($key);
            case '{s}':
                return is_string($key);
            case '{*}':
                return true;
            default:
                return is_numeric($token) ? ($key == $token) : $key === $token;
        }
    }
protected static function _matchToken ( $ key , $ token ) { switch ( $ token ) { case '{n}' : return is_numeric ( $ key ) ; case '{s}' : return is_string ( $ key ) ; case '{*}' : return true ; default : return is_numeric ( $ token ) ? ( $ key == $ token ) : $ 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 .