What is the difference between access modifiers in php? [closed]
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(