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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.