public function setName($name,$value){
$this->$name = $value;
}
Can’t we directly execute the following function to set the corresponding attributes? ?
$obj->setName('name','new name');
$obj->setName('age','22');
$obj->setName(' salary,'6000');
Why do you need to write setAge($name,$value) separately?