[PHP-DEV] Re: HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-07 Thread Rowan Collins
On 07/10/2013 18:19, Daniel Lowrey wrote: >> You can't efficiently model an HTTP request with associative arrays. Period. > The fact is that for 99% of use cases, yes you can, and developers > happily do so. Leaky abstraction is leaky. If this is truly an efficient model of the HTTP request t

Re: [PHP-DEV] Re: HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-07 Thread Rowan Collins
Daniel Lowrey wrote (on 02/10/2013): Something like the following would be an infinitely superior solution: interface HttpRequest { While having a quick look for userland parsing functions earlier, I came upon the PECL http extension, which includes this all-singing object: http://www.php.n

[PHP-DEV] Re: HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-04 Thread Daniel Lowrey
> Uhmmm... I actually meant an interal API not userland :) Hehe, I'd be really excited to see this in userland too. Happy to help make this happen unless people have good reasons not to expose the parsers ...

Re: [PHP-DEV] Re: HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Johannes Schlüter
On Wed, 2013-10-02 at 17:47 +0200, Florian Anderiasch wrote: > On 02.10.2013 17:29, Daniel Lowrey wrote: > > The superglobals are a hopelessly poor abstraction. Can we stop trying to > > put the proverbial gold ring in the pig's snout on this? > > > > [...] > > > > Something like the following woul

Re: [PHP-DEV] Re: HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Florian Anderiasch
On 02.10.2013 17:29, Daniel Lowrey wrote: > The superglobals are a hopelessly poor abstraction. Can we stop trying to > put the proverbial gold ring in the pig's snout on this? > > [...] > > Something like the following would be an infinitely superior solution: > > interface HttpRequest { > fu

[PHP-DEV] Re: HTTP supergloblas and request body/query (was: Parsing PUT data)

2013-10-02 Thread Daniel Lowrey
The superglobals are a hopelessly poor abstraction. Can we stop trying to put the proverbial gold ring in the pig's snout on this? While a change to `$_QUERY` and `$_BODY` would undoubtedly be an improvement I don't think the massive BC breaks that would result are justified by simply improving va