Sara Golemon wrote (on 05/02/2014):
Wanna lol? Here's sxe's current implementation of get_debug_info (in
ext/simplexml/simplexml.c)
static HashTable * sxe_get_debug_info(zval *object, int *is_temp TSRMLS_DC) {
*is_temp = 1;
return sxe_get_prop_hash(object, 1 TSRMLS_CC);
}
If you can even call that an implementation. :p
If you're up to improving it, that's the spot to do it.
Yeah, I was just pulling that up in lxr. In its defence, the extra 1 is an is_debug parameter which triggers creation of a temporary HashTable instead of a permanently initialised one, and adds an '@attributes' member, so somebody did make *some* effort...
I'm still just beginning to get my head round the engine code, so don't hold your breath, but it's definitely something I'd like to help improve...
--
Rowan Collins
[IMSoP]