Edit report at https://bugs.php.net/bug.php?id=63910&edit=1
ID: 63910 Updated by: cataphr...@php.net Reported by: hanskrentel at yahoo dot de Summary: var_dump() on DOMNode is like in PHP < 5.4.1 -Status: Open +Status: Not a bug Type: Bug Package: DOM XML related Operating System: Win32 / XP PHP Version: 5.4.10 Block user comment: N Private report: N New Comment: Marking as bogus, as the problem is apparently in the Xdebug. Previous Comments: ------------------------------------------------------------------------ [2013-01-05 21:25:35] hanskrentel at yahoo dot de For reference: I create a ticket over at xdebug: http://bugs.xdebug.org/view.php? id=913 ------------------------------------------------------------------------ [2013-01-05 16:01:22] hanskrentel at yahoo dot de Okay, I found out that my report is somewhat bogus. I had xdebug enabled. Disabling xdebug did reveal the expected output. [xdebug] ; zend_extension = c:\Programme\PHP-5.4\ext\php_xdebug-2.2.1-5.4-vc9-nts.dll ------------------------------------------------------------------------ [2013-01-05 15:01:58] hanskrentel at yahoo dot de Description: ------------ If I want to make use of the improvements for DOMNodes with var_dump since PHP 5.4.1 on my system, I can't. It's just like the old (not-so-much-saying) output like before 5.4.1. It is like that if the changes of which are said that have been introduced in PHP 5.4.1 (demo: http://3v4l.org/8HfO6 - Changelog named this feature for 5.3.11 "Added debug info handler to DOM objects.") are just not there on my system. Related: #48527 (You might want to close this for now) Test script: --------------- <?php $DOMDocumentNode = new DOMDocument(); $DOMDocumentNode->loadXML('<example a="b">Test</example>'); $DOMElementNode = $DOMDocumentNode->documentElement; $DOMAttributeNode = $DOMElementNode->getAttributeNode('a'); $DOMTextNode = $DOMElementNode->firstChild; var_dump($DOMDocumentNode, $DOMElementNode, $DOMAttributeNode, $DOMTextNode); Expected result: ---------------- object(DOMDocument)#1 (34) { ["doctype"]=> NULL ["implementation"]=> string(22) "(object value omitted)" ["documentElement"]=> string(22) "(object value omitted)" ["actualEncoding"]=> NULL ["encoding"]=> NULL ["xmlEncoding"]=> NULL ["standalone"]=> bool(true) ["xmlStandalone"]=> bool(true) ["version"]=> string(3) "1.0" ["xmlVersion"]=> string(3) "1.0" ["strictErrorChecking"]=> bool(true) ["documentURI"]=> string(1) "/" ["config"]=> NULL ["formatOutput"]=> bool(false) ["validateOnParse"]=> bool(false) ["resolveExternals"]=> bool(false) ["preserveWhiteSpace"]=> bool(true) ["recover"]=> bool(false) ["substituteEntities"]=> bool(false) ["nodeName"]=> string(9) "#document" ["nodeValue"]=> NULL ["nodeType"]=> int(9) ["parentNode"]=> NULL ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> string(22) "(object value omitted)" ["lastChild"]=> string(22) "(object value omitted)" ["previousSibling"]=> NULL ["attributes"]=> NULL ["ownerDocument"]=> NULL ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> string(1) "/" ["textContent"]=> string(4) "Test" } object(DOMElement)#2 (17) { ["tagName"]=> string(7) "example" ["schemaTypeInfo"]=> NULL ["nodeName"]=> string(7) "example" ["nodeValue"]=> string(4) "Test" ["nodeType"]=> int(1) ["parentNode"]=> string(22) "(object value omitted)" ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> string(22) "(object value omitted)" ["lastChild"]=> string(22) "(object value omitted)" ["previousSibling"]=> NULL ["attributes"]=> string(22) "(object value omitted)" ["ownerDocument"]=> string(22) "(object value omitted)" ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> string(7) "example" ["baseURI"]=> string(1) "/" ["textContent"]=> string(4) "Test" } Warning: var_dump(): Not yet implemented in /in/MXnGG on line 18 object(DOMAttr)#3 (20) { ["name"]=> string(1) "a" ["specified"]=> bool(true) ["value"]=> string(1) "b" ["ownerElement"]=> string(22) "(object value omitted)" ["schemaTypeInfo"]=> NULL ["nodeName"]=> string(1) "a" ["nodeValue"]=> string(1) "b" ["nodeType"]=> int(2) ["parentNode"]=> string(22) "(object value omitted)" ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> string(22) "(object value omitted)" ["lastChild"]=> string(22) "(object value omitted)" ["previousSibling"]=> NULL ["attributes"]=> NULL ["ownerDocument"]=> string(22) "(object value omitted)" ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> string(1) "a" ["baseURI"]=> string(1) "/" ["textContent"]=> string(1) "b" } object(DOMText)#4 (18) { ["wholeText"]=> string(4) "Test" ["data"]=> string(4) "Test" ["length"]=> int(4) ["nodeName"]=> string(5) "#text" ["nodeValue"]=> string(4) "Test" ["nodeType"]=> int(3) ["parentNode"]=> string(22) "(object value omitted)" ["childNodes"]=> NULL ["firstChild"]=> NULL ["lastChild"]=> NULL ["previousSibling"]=> NULL ["attributes"]=> NULL ["ownerDocument"]=> string(22) "(object value omitted)" ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> string(1) "/" ["textContent"]=> string(4) "Test" } Actual result: -------------- class DOMDocument#1 (0) { } class DOMElement#2 (0) { } class DOMAttr#3 (0) { } class DOMText#4 (0) { } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63910&edit=1