tags:

views:

40

answers:

1

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

But, object of domXPath or DomDocument are not captured in echo or print_r.

How to get values from above objects while debugging PHP code?

A: 

This is a bug:

For some reason, DOM* classes do not expose their properties, neither to Reflection, nor to any other function capable of inspecting objects. You'd have to write a custom inspector that collects the properties manually.

Gordon