I just discover these functions seems redundant.
http_build_query() belong to standard php functions.
http_build_str() is part of pecl_http package.
are they 100% redundant ?
I am focused on getting the perfect reverse function of parse_str(). since http_build query() is broken. ( see reference )
I wondering if there is some way that http_build_str() could have any advantage to support/tolerate more edge cases.
By reading the API, it appears that
http_build_str()does not URL encode the parameters, whilehttp_build_query()does.http_build_str()also can take either an object OR an object as its primary argument, whilehttp_build_query()only takes an array.