public static function isTokenType($token, $types)
    {
        if (!is_array($types)) {
            $types = array($types);
        }
        return is_array($token) ? in_array($token[0], $types) : in_array($token, $types);
    }
public static function isTokenType($token, $types)
    {
        if (!is_array($types)) {
            $types = array($types);
        }
        return is_array($token) ? in_array($token[0], $types) : in_array($token, $types);
    }
public static function isTokenType ( $ token , $ types ) { if ( ! is_array ( $ types ) ) { $ types = array ( $ types ) ; } return is_array ( $ token ) ? in_array ( $ token [ 0 ] , $ types ) : in_array ( $ token , $ types ) ; }
Checks whether a given token is any one of the specified token types

@param array $token the token to check
@param array|int $types the array of types
@return bool true if the token matches one the types
Checks whether a given token is any one of the specified token types