Object Oriented Programming is a programming model that is based on the concept of ________ and ________
Classes and Objects
This is an advantage of OOP that helps in making code much easier to maintain, modify and debug
DRY - Don’t Repeat Yourself
Two main aspects of OOP
Classes and Objects
A self-contained, independent collection of variables and functions which work together to perform one or more specific tasks
Class
This is individual instance of a class
Object
A class acts as ____ or ____ from which individual objects can be created.
Template; Blueprint
How a class can be declared?
Variables within a class
properties
Functions within a class
Methods
How should class names be written in _____ with each word should be ______ and starts with the uppercase letter
PascalCase; concatenated
It is used to access contained properties and methods of a given object
Arrow Symbol (->)
This is a reference to the calling object
$this
It allows us to initialize the object’s properties upon creation of an object
Constructor
This function declares the constructor in the class
__construct();
This must be included when declaring a construct
Double underscore
It is called when the object is destructed or the script is stopped or exited
Destructor
This is called at the end of the script of the class
__destruct();
Constructors are invoked automatically every time you _______ while destructors are in automatically invoked when you create a ______
create an object; __destruct() function
One can restrict access to properties and methods by the use of __________, also called as, ___________, for greater control
Visibility Keywords; Access Modifiers
This is a property or method that can be accessed anywhere within or outside of class
public
This property or method can only be accessed within the class or an inherited class
protected
This is a property or method that is accessible only within the class that defines it.
private
Classes can inherit the properties and methods of another class using ____ keyword
extends
What is the difference of constant and static variables