1. Class
Each pendefinisain / declaration of a class in PHP using a class that followed the class name, then followed the '{' and ends with the sign '}' we can give any name of a class, while not the same as PHP functions owned. example, print class. print class name can not we use it, because the print is owned by a PHP function. We can load / define the property class and the method of the class among the "braces". variable $ this is a fictitious variable that is used to summon the properties or method of a class. The following examples will further clarify about the class in php
//kelas orang
class orang{
//Properties Class
var $nama;
var $umur;
var $tinggi;
var $berat;
function orang (){//Constructor
echo "Initialisation Object";
}
function get_nama(){
return $this->nama;
}
}//end class