Re: SimpleXML's atXPath method

From: Date: Sat, 07 Jan 2017 17:37:05 +0000
Subject: Re: SimpleXML's atXPath method
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-97560@lists.php.net to get a copy of this message
2017-01-07 18:01 GMT+01:00 Joe Watkins <pthreads@pthreads.org>: > Evening Rowan, > > I must protest: It is wasteful, unclear, and generally nasty, to create, > return, and manipulate an array if you are only ever going to reference one > element in code. > > It is quite normal to know the structure of a document ahead of time, and > this would allow you to write more succinct and less wasteful code. > > It would appear valuable to me ... I'm not in love with the name of the > thing, but the basic idea appears valuable. I agree, the feature/idea is great. Coming from someone who worked a fair bit with XML recently (I know I know!). Same goes for the method naming, seems a little bit awkward -- regards, Kalle Sommer Nielsen kalle@php.net

« previous php.internals (#97560) next »