| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2021-02-22 14:54 UTC] cmb@php.net
  [2022-04-22 13:24 UTC] ilutov@php.net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 13:00:02 2025 UTC | 
Description: ------------ If I var_export() a DOMDocument, I get an incomplete representation of the DOM data. "That's funny, it did it a moment ago." If I var_dump() a DOMDocument, I get a complete representation of the DOM data. "So then I tried SimpleXML" If I use SimpleXML, var_export() and var_dump() returns me a full representation of data. "Show me." In an extension, to enable var_dump() we need to implement : zend_object_handlers.get_debug_info What should be implemented to enable var_export() ? Test script: --------------- $doc = new DOMDocument(); $doc->loadXML("<root><item>Text</item></root>"); var_export($doc); Expected result: ---------------- DOMDocument::__set_state(array( 'doctype' => NULL, 'implementation' => '(object value omitted)', 'documentElement' => '(object value omitted)', 'actualEncoding' => NULL, 'encoding' => NULL, 'xmlEncoding' => NULL, 'standalone' => true, 'xmlStandalone' => true, 'version' => '1.0', 'xmlVersion' => '1.0', 'strictErrorChecking' => true, 'documentURI' => '[...]', 'config' => NULL, 'formatOutput' => false, 'validateOnParse' => false, 'resolveExternals' => false, 'preserveWhiteSpace' => true, 'recover' => false, 'substituteEntities' => false, 'nodeName' => '#document', 'nodeValue' => NULL, 'nodeType' => 9, 'parentNode' => NULL, 'childNodes' => '(object value omitted)', 'firstChild' => '(object value omitted)', 'lastChild' => '(object value omitted)', 'previousSibling' => NULL, 'nextSibling' => NULL, 'attributes' => NULL, 'ownerDocument' => NULL, 'namespaceURI' => NULL, 'prefix' => '', 'localName' => NULL, 'baseURI' => '[...]', 'textContent' => 'Text', )) Actual result: -------------- DOMDocument::__set_state(array( ))