From: salathe Operating system: PHP version: 5.4.1 Package: DOM XML related Bug Type: Bug Bug description:DOMAttr debug info generates E_WARNING
Description: ------------ Trying var_dump()/print_r() a DOMAttr prints an E_WARNING message "Not yet implemented". Test script: --------------- <?php $doc = new DOMDocument(); $doc->loadXML('<example a="b">Test</example>'); $example = $doc->getElementsByTagName('example')->item(0); $attr = $example->getAttributeNode('a'); var_dump($attr); print_r($attr); Expected result: ---------------- object(DOMAttr)#2 (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" } DOMAttr Object ( [name] => a [specified] => 1 [value] => b [ownerElement] => (object value omitted) [schemaTypeInfo] => [nodeName] => a [nodeValue] => b [nodeType] => 2 [parentNode] => (object value omitted) [childNodes] => (object value omitted) [firstChild] => (object value omitted) [lastChild] => (object value omitted) [previousSibling] => [attributes] => [ownerDocument] => (object value omitted) [namespaceURI] => [prefix] => [localName] => a [baseURI] => / [textContent] => b ) Actual result: -------------- Warning: var_dump(): Not yet implemented in /tmp/php-OE78FO on line 9 object(DOMAttr)#2 (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" } DOMAttr Object Warning: print_r(): Not yet implemented in /tmp/php-OE78FO on line 10 ( [name] => a [specified] => 1 [value] => b [ownerElement] => (object value omitted) [schemaTypeInfo] => [nodeName] => a [nodeValue] => b [nodeType] => 2 [parentNode] => (object value omitted) [childNodes] => (object value omitted) [firstChild] => (object value omitted) [lastChild] => (object value omitted) [previousSibling] => [attributes] => [ownerDocument] => (object value omitted) [namespaceURI] => [prefix] => [localName] => a [baseURI] => / [textContent] => b ) -- Edit bug report at https://bugs.php.net/bug.php?id=61858&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61858&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61858&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61858&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61858&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61858&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61858&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61858&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61858&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61858&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61858&r=support Expected behavior: https://bugs.php.net/fix.php?id=61858&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61858&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61858&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61858&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61858&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=61858&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61858&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61858&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61858&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61858&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61858&r=mysqlcfg