I am totally confused with access modifiers in php. Is there any difference regarding memory utilization for access modifiers or only difference of accessibility..Please suggest. If i have following code:
public Class Employee {
public $emp_name='xyz';
protected $emp_phone='1234567891';
private $emp_code='101';
public function getName($name) {
return 'Employee name is :' . $name;
}
protected function getPhone($ph) {
return 'Employee contact number is :' . $ph;
}
private function getCode($id) {
return 'Employee code is :' . $id;
}
$emp = new Employee();
$emp->getName($emp_name);
$emp->getPhone($emp_phone);
$emp->getName($id);
}
Now could any one tell me that how much memory will above variable or function took place.