Debugging a DomXPath and DomDocument Object

We use echo or print_r to get the value of variables when debugging PHP code.

But the domXPath or DomDocument object is not written to echo or print_r.

How to get values ​​from the above objects when debugging PHP code?

+3
source share
1 answer

This is mistake:

For some reason, classes DOM*do not reveal their properties, nor Reflection, nor any other function that can check objects. You will need to write your own inspector, which collects the properties manually.

+1
source

Source: https://habr.com/ru/post/1771254/


All Articles