I don't know how in else languages, but in PHP seems to me that they are very unsafe way how to set value of any member variable - because one setter cannot easily validate input for many variables (mostly if they are of various types)Most examples of magic setters say only public $prop = array();public function __set($name, $value){    $this->prop[$name] = $value;}There is not any validation. And it is wrong.Even if I would add validation, still I cannot easily validate all types, because code of function would be very very long.ProblemIs any way how to make magic setters safe?or is it really better to avoid their using (define own setter for each member variable)?
Safety of magic setters in PHP
object oriented;php