Debug a DOMDocument Object in PHP

后端 未结 6 1041
情书的邮戳
情书的邮戳 2020-11-29 05:49

I\'m trying to debug a large and complex DOMDocument object in php. Ideally it\'d be nice if I could get DOMDocument to output in a array-like format.

DoMDocument

6条回答
  •  醉话见心
    2020-11-29 06:34

    for a dom node, just use the following:

    print_r(simplexml_import_dom($entry)->asXML());
    

提交回复
热议问题