The sample codes listed is very confusing. I am modifying them to make sure it works. I still don't have a good handle / understanding of class. What can't we just use function()???
I think one of the features of PHP is to make it class/object oriented. To do so, you need to understand Class and Object and how they are used. I will spent more time with this to make sure I understand what I am doing.
This is a sample ... I created a class called Dog and calling it from outside.