unset() makes it behave exactly like parse_url() is behaving in new PHP versions.
join_url() won't fail because if schema isn't set and host or user/password is set, it will add // at the beginning of url