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

2021-08-06 Thread Christoph M. Becker
On 06.08.2021 at 16:09, Scott Arciszewski wrote: > http_parse_query() would get my vote (if I had vote karma :P) You have a php.net account[1], so you are supposed to have voting karma. :) [1] -- Christoph M. Becker -- PHP Internals - PHP Runtime Developmen

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

2021-08-06 Thread Scott Arciszewski
http_parse_query() would get my vote (if I had vote karma :P) On Fri, Aug 6, 2021 at 4:05 AM Mike Schinkel wrote: > > On Aug 6, 2021, at 3:51 AM, Aleksander Machniak wrote: > > > > I agree about the _string suffix removal. However, I know we have > > parse_url() already, but parse_query() might

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

2021-08-06 Thread Rowan Tommins
On 06/08/2021 12:12, Kamil Tekiela wrote: Perhaps, instead of adjusting this behaviour only for the new function, we could remove this behaviour as a whole, given that it is a remainder of the long-forgotten register globals? I don't see any use for it anymore Changing behaviour like this is t

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

2021-08-06 Thread Kamil Tekiela
btw why isn't foo.bar=123 decoded to array("foo.bar"=>123); ? > this looks pretty bad to me https://3v4l.org/6Wa23 Hi Hans, This is because variables in PHP that contain the concatenation operator or space are much more difficult to access. See https://3v4l.org/vUBWK As the primary purpose of p

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

2021-08-06 Thread Hans Henrik Bergan
btw why isn't foo.bar=123 decoded to array("foo.bar"=>123); ? this looks pretty bad to me https://3v4l.org/6Wa23 On Fri, 6 Aug 2021 at 10:29, Peter Bowyer wrote: > On Fri, 6 Aug 2021 at 08:18, ignace nyamagana butera > wrote: > > > I read your RFC and I understand the intent in improving the c

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

2021-08-06 Thread Ayesh Karunaratne
> I agree about the _string suffix removal. However, I know we have > parse_url() already, but parse_query() might be too generic. I would > suggest adding "http" to the name. And as we already have > http_build_query() I would rather see http_parse_query(). > +1 for http_parse_query() as it sound

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

2021-08-06 Thread Peter Bowyer
On Fri, 6 Aug 2021 at 08:18, ignace nyamagana butera wrote: > I read your RFC and I understand the intent in improving the current > parse_str function behaviour by introducing a new function to > avoid possible breakage, > However I feel that we are missing a chance to also improve how parse_str

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

2021-08-06 Thread Mike Schinkel
> On Aug 6, 2021, at 3:51 AM, Aleksander Machniak wrote: > > I agree about the _string suffix removal. However, I know we have > parse_url() already, but parse_query() might be too generic. I would > suggest adding "http" to the name. And as we already have > http_build_query() I would rather see

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

2021-08-06 Thread Aleksander Machniak
On 06.08.2021 09:45, Mike Schinkel wrote: > I too would appreciate having a function in the PHP library that returns an > array and that is named more intuitively than parse_str(). > > However, I would suggest naming it `parse_query()` instead of > `parse_query_string()` as `_string()` is redund

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

2021-08-06 Thread Mike Schinkel
> On Aug 5, 2021, at 6:21 PM, Kamil Tekiela wrote: > > I have added implementation for > https://wiki.php.net/rfc/parse_str_alternative. If there are no other > comments, I would like to start voting on Saturday. I too would appreciate having a function in the PHP library that returns an array

[PHP-DEV] [RFC] Add parse_query_string as an alternative to parse_str

2021-08-06 Thread ignace nyamagana butera
Hi Kamil Tekiela, I read your RFC and I understand the intent in improving the current parse_str function behaviour by introducing a new function to avoid possible breakage, However I feel that we are missing a chance to also improve how parse_str algorithm is currently used, we could or should (?

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

2021-07-19 Thread Kamil Tekiela
Hi All, Thanks for the feedback. I decided not to pursue this for PHP 8.1, but I still think it is a good idea. As Nikita explained Sara's suggestion might not work at all. While it is trivially easy to abstract this function in userland the aim is to clean up PHP. This wouldn't add new functional

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

2021-06-29 Thread Nikita Popov
On Thu, Jun 24, 2021 at 1:20 AM Sara Golemon wrote: > On Wed, Jun 23, 2021 at 5:02 PM Kamil Tekiela > wrote: > > > I would like to propose a new simple RFC that aims to add a new function > > called parse_query_string as an alternative to parse_str. > > > > https://wiki.php.net/rfc/parse_str_alt

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

2021-06-23 Thread David Rodrigues
I really prefer the Sara suggestion, instead of creating a new function to do the same thing. parse_str($str): array. Atenciosamente, David Rodrigues Em qua., 23 de jun. de 2021 às 20:20, Sara Golemon escreveu: > On Wed, Jun 23, 2021 at 5:02 PM Kamil Tekiela > wrote: > > > I would like to pr

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

2021-06-23 Thread Sara Golemon
On Wed, Jun 23, 2021 at 5:02 PM Kamil Tekiela wrote: > I would like to propose a new simple RFC that aims to add a new function > called parse_query_string as an alternative to parse_str. > > https://wiki.php.net/rfc/parse_str_alternative > > The functionality stays the same, only the name and th

[PHP-DEV] [RFC] Add parse_query_string as an alternative to parse_str

2021-06-23 Thread Kamil Tekiela
Hi Internals, I would like to propose a new simple RFC that aims to add a new function called parse_query_string as an alternative to parse_str. https://wiki.php.net/rfc/parse_str_alternative The functionality stays the same, only the name and the way of returning the array changes. While it is