i am trying to create an object using the php Reflection class but i can't figure out how to initialize it. as shown in the following code:
$obj = new \ReflectionClass('CLASS NAME');
$inst = $obj->newInstanceWithoutConstructor();
foreach($row as $key => $value){
$obj->$key = $value;
}
return $obj;
i get the following error:ReflectionException: Cannot set read-only property ReflectionClass::$name