Do not memorize, learn programming concepts instead.
1- What is a variable ?
A variable allows you to store information and retrieve it from memory.
A variable can be changed, a constant can not.
2- What is a function?
A function is an encapsulated piece of code that can be re-used.
A function can accept arguments.
A function can return data.
3- What are conditionals ?
If something is true do “this”, if false do “that”
4- what is a class ?
A class is a blue print for an object.
A class contains a constructor, properties, methods.
A constructor sets up the properties.
A property is a noun, it describes something.
A method is a function inside a class, methods performs an action like a verbs do.
The $this keyword refers to the instance of the class called, object.
Public and protected provide accessibility for the instance of the class
5- access modifiers
public: visible everywhere (object’s instance, super and sub-classes)
protected: visible only (inside super and sub-classes)
private: visible only inside a class declared (not in object’s instance, not super and sub-classes)
6-model view controller
controller: handles the requests by the user known as routes, it does the routing
model: handles the data like CRUD from a database, it fetches the data.
view: displays the data back to the user, it displays the data.