What is a Class in PHP?UNITRAi
In simple words, class is a user defined datatype. Which have its own constants, variables and functions. The variables of a Class are called properties of the Class and Functions of the Class are called methods of the Class.
Name of the class can be anything provided that it must be a combination of letters, underscores and numbers. It must start with a letter and underscore.
How it looks like:
// properties or variables declaration
public $var1 = “this is public variable1”;
private $var2 = ‘this is private variable 2’;
// functions or methods declaration
public function bring1()