object oriented programming

Class:
Definition:
Object Oriented Programming(oop), Class is a Keyword. which is define by a Class Name, followed by a pair curly braces and in define property and method. It is a Basic class definition.

Class name must be declare a valid/unique name not use php reserve keywords. A unique/valid name start letter or underscore, followed by any number of letters, numbers, underscore and regular express.

Class property like as normal “variable” and Method like as normal function.

Example:
#class name declare
class watch{
#property
public $name=”casio”;
#method
public function get_name(){}
}

Leave a comment