rgb192
asked on
use var_dump() to print out the objects before and after you call the methods.
Followup to this comment
https://www.experts-exchange.com/questions/28314431/instantiate-the-object-to-see-all-the-echo-statements.html?anchorAnswerId=39708244#a39708244
How can this be done?
https://www.experts-exchange.com/questions/28314431/instantiate-the-object-to-see-all-the-echo-statements.html?anchorAnswerId=39708244#a39708244
Instead of using echo (which will call the __toString() method and will deliberately remove most of the character of the object), use var_dump() to print out the objects before and after you call the methods. By comparing the objects you will be able to see the effect of the programming.
How can this be done?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@Slick812: No, I did not look at the code you posted. PHP is a funhouse language, full of all sorts of quirky and inconsistent language constructs. One of the things that works fairly dependably is var_dump() and that's why I like to use it.
OK Ray, Not sure how using var_dump() will help rgb192 understand PHP Object programming in his original question in this series, But that is in the question here. I really hope rgb192 can understand some of the non-simple example code posted here for his help. Thansk for your assistance.
ASKER
Cd answers question. Ray gives example about interfaces, extending and slick relates to previous question. Thanks