Simple example of Object Oriented Programming (OOP) in PHP

This is very basic example of object oriented programming.

class MyClass{    //Creating a Class name MyClass
    private $Name , $Age , $Address;

    public function setInfo($Name , $Age , $Address){
        $this->Name = $Name;
        $this->Age = $Age;
        $this->Address = $Address;
    }

    public function getInfo(){
        return 'Name : '.$this->Name. ' <br/>Age : '. $this->Age. ' 
        <br/>Address : '.$this->Address;
    }
}

$Obj = new MyClass();
$Obj->setInfo('Your Name', 25 , 'Your Address');
echo $Obj->getInfo();