Re: [RFC] [VOTE] __debugInfo()

From: Date: Wed, 05 Feb 2014 19:30:26 +0000
Subject: Re: [RFC] [VOTE] __debugInfo()
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Sara Golemon wrote (on 05/02/2014):
(such as current uses in dom, sxe, mysqli, intl, and spl)
If "sxe" in there means SimpleXML, I wish it would do a better job of it! There are countless questions on StackOverflow, and comments in the PHP manual, confused by its mention of "array", "@attributes", etc, and the fact that it omits CDATA nodes, any text node with a non-text sibling, anything in a namespace, etc, etc e.g. http://3v4l.org/h6KeF In fact, now that I know this hook exists, and doesn't affect the action of array casts, I'm tempted to attempt a patch that would improve it, based on the simplexml_tree function I've written at https://github.com/IMSoP/simplexml_debug I guess even if I don't get good enough at C hacking, I could write a version using this new user-land callback :) It's a shame it can't (AIUI) return a completely pre-formatted string, so that complex objects wouldn't have to pretend to contain arrays in order to represent nested properties. -- Rowan Collins [IMSoP]

Thread (55 messages)

« previous php.internals (#72286) next »