From: hanskrentel at yahoo dot de Operating system: Win32 / XP PHP version: 5.4.10 Package: DOM XML related Bug Type: Bug Bug description:var_dump() on DOMNode is like in PHP < 5.4.1
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 bug report at https://bugs.php.net/bug.php?id=63910&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63910&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63910&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63910&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63910&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63910&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63910&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63910&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63910&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63910&r=support Expected behavior: https://bugs.php.net/fix.php?id=63910&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63910&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63910&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63910&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63910&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63910&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63910&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63910&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63910&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63910&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63910&r=mysqlcfg