Examining Objects |
Veteran
|
First, I'd suggest avoiding using @ to suppress messages, it is a bad habit and has cost me alot of time in the past.
Second you can use print_r() to echo out the object, or (better yet) use PHPEd's excellent debugger to inspect the object while debugging the script. |
||||||||||||
|
|
Thanks for the response. Actually using the @ syntax is not normally something I do I'm just using some example code. I was perhaps less than specific, I am using the debugger but I don't seem to be able to see anyway of examining the object in it.
|
||||||||||||
|
Veteran
|
If you're already in debug mode, after the debugger has run past the code that would populate your object, mouse over it. You can also look for a tab called "Watch" and add the variable into the watchlist (works good for large objects or arrays)
|
||||||||||||
|
|
That's what I was expecting to happen but no; if I add $objHTMLPage1 to the watch window it changes from null as the program passes the line:-
However it shows no content in the value column and just Object(DOMDocument) in the type column. The code executes fine however. |
||||||||||||||
|
Guru master
|
You can't see the contents of those kind of objects, there internally to PHP. You can run any code on them you want by just typing them in the immediate window while the debugger is paused I often use this to check or change objects.
|
||||||||||||
|
|
Thanks |
||||||||||||||
|
Examining Objects |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by