Re: Re: [RFC] Add parse_query_string as an alternative to parse_str

From: Date: Wed, 18 Aug 2021 12:01:33 +0000
Subject: Re: Re: [RFC] Add parse_query_string as an alternative to parse_str
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-115761@lists.php.net to get a copy of this message
On Fri, Aug 6, 2021 at 9:43 PM Kamil Tekiela <tekiela246@gmail.com> wrote: > Hi Internals, > > Thanks for all the feedback. I have changed the name to http_parse_query as > it looks like more people prefer that name. I have also updated > https://wiki.php.net/rfc/parse_str_alternative for 8.2 (sorry > for the > confusion) and I added open points. > I hear two concerns currently about this RFC. Please note that my intention > was to provide a simple drop-in replacement. However, I agree that there is > a lot of room for improvement in this area, so I highly appreciate your > comments on how we can best tackle these open points. > I will not open this RFC for voting any time soon, as I want to let the > conversation run through to see what other options/concerns people have. > Please feel free to share your comments on what you think is the right path > to improve this functionality in PHP. > > Regards, > Kamil > Hi, thanks for the RFC. I agree with Rowan in https://externals.io/message/115642 that http_parse_query() should "mirror http_build_query() as closely as possible", notably: - have a similar signature (except for the first parameter `array|object $data becoming string $query and the return type string` becoming array, of course); - do not do name mangling (and for your question "what should happen to mismatched square brackets?": not sure without an example, but I would say "just keep them as is"). Best regards, -- Guilliam Xavier

« previous php.internals (#115761) next »