Rasmus Lerdorf wrote:
Yeah, I agree actually. My real beef is that simplexml and var_dump()
don't place nicely with each other. var_dump() ends up lumping the
namespaced elements in with the non-namespaced elements of the same
name, but when you iterate through things manually they are not lumped
together and the only way to get at the namespaced elements is by
checking for them directly with the appropriate children() call.
I am fine with having to manually dereference the namespace and keeping
things completely separate. I'd just like it to be easier for people to
use var_dump() on a simplexml object and not have it confuse the heck
out of them by showing them arrays with 2 elements in them which when
they iterate only get 1 or if they call count() on it only get 1.
It doesnt look difficult to make var_dump respect the namespace set by
the initial sxe object for subobjects. If it were to be changed I would
also suggest not returning non element type nodes as well. Right now PI,
Comments, etc.. get returned by var_dump but these aren't considered sxe
properties either.
Rob
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php