quick links

What is encapsulation?

How you visible private and protected method and variable out side class is called encapsulation.

class Encap {
public $name;
private $id;
protected $tax;

public function userId() {
return $this->id = 786;
}
}
$obj = new Encap();
echo $obj->userId();

 

About Us

Joomla Web Solution

We love working with PHP, HTML5, CSS3, jQuery and the most-loved content management framework in the world, Joomla!

LIKE US ON FACEBOOK