We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
&
In PHP, keys with empty arrays or objects are not added to the query string.
For example in PHP:
http_build_query([ 'dog' => 1, 'cat' => [], 'mouse' => new StdClass(), 'rabbit' => 2 ]); // Returns: "dog=1&rabbit=2"
Interactive PHP test case: https://3v4l.org/l1haG
http-build-query doesn't add these to the query string, which is correct, but does add extraneous & symbols:
http-build-query
hbq( { 'dog': 1, 'cat': [], 'mouse': {}, 'rabbit': 2 } ); // Returns: "dog=1&&&rabbit=2"
Interactive JS test case: https://runkit.com/cvp/5b265e43c28df80012c7edd7
These extra & symbols don't hurt anything, but don't match the PHP implementation.
The text was updated successfully, but these errors were encountered:
29e6654
No branches or pull requests
In PHP, keys with empty arrays or objects are not added to the query string.
For example in PHP:
Interactive PHP test case: https://3v4l.org/l1haG
http-build-query
doesn't add these to the query string, which is correct, but does add extraneous&
symbols:Interactive JS test case: https://runkit.com/cvp/5b265e43c28df80012c7edd7
These extra
&
symbols don't hurt anything, but don't match the PHP implementation.The text was updated successfully, but these errors were encountered: