Think of the object as a kind of "super array." Properties are like keys in an associative array. Also, you can think of properties of an object as a kind of "package deal," bundled together, having them easily accessible in one place
Inside the class you can assign an initial value to the property. Later, in the property's methods, you can refer to the property using "$this->nameOfProperty = value;"
Assuming the visibility level is "public" outside the class you can use the property like this: "echo $object->property" or you can assign a value like this: "$object->property = value;"
Methods are grouped together inside classes. You would then develop classes which can be used for generating the HTML of the website, and also for processing information on the website
There is nothing wrong with making everything "public," which is the default. If you are working with other developers, however, you may decide mark certain methods or properties only for use internal to the class definition. In this case use "protected" or "private."
If you want to change the functionality of an existing method, simply create a method of the same name in the "child" class. This is referred to as "overriding". You can also create new methods and properties in the "child" class.
Because exceptions can be "caught" you can implement a controlled recovery, which results in less nasty error messages and helps safeguard the website against attackers
In the Model folder we will place PHP scripts relating to data access In the View folder we will place files relating to output The index.php file will become the "Controller"