Re: [PHP-DEV] Request #67949 DOMNodeList should implement ArrayAccess

2014-09-21 Thread Andrea Faulds
On 21 Sep 2014, at 22:43, Peter Cowburn wrote: > The DOM has a very specific API that we should be keeping to, and > encouraging developers to use. This is true and we should keep doing this. > I’d *much* rather see the DOM implementation completed (check out all of > the “not implemented” par

Re: [PHP-DEV] Request #67949 DOMNodeList should implement ArrayAccess

2014-09-21 Thread Peter Cowburn
On 21 September 2014 12:39, Florian Margaine wrote: > Hi list, > > The request is so that we can do this: > > $html = << data > HTML; > $doc = new DOMDocument; > $doc->loadHTML($html); > var_dump($doc->getElementsByTagName('div')[0]->textContent); > > I started implementing this on my branch ( >

[PHP-DEV] Request #67949 DOMNodeList should implement ArrayAccess

2014-09-21 Thread Florian Margaine
Hi list, The request is so that we can do this: $html = <loadHTML($html); var_dump($doc->getElementsByTagName('div')[0]->textContent); I started implementing this on my branch ( https://github.com/Ralt/php-src/tree/issue-67949), but then I was thinking..