well i do have a small PHP class with some properties on it
class A{
public $pro1 = "abc";
public $pro2 = "def";
public function __construct(){}
}
$a = new A();
now i want to change $a
's properties by using an associative array, somewhat like this
$modpro = array("pro1"=>"123","pro2"=>"456");
modify_object($a,$modpro);
is this possible?
NOTE: i don't have the right to modify the class and my problem is my senior is always modifying the class. I'm thinking of much dynamic way of handling the changes the class without setting many methods for modifying the object properties