Consider the following code. What change must be made to the class for the code to work as written? class Magic { protected $v = array("a" => 1, "b" => 2, "c" => 3); public function __get($v) { return $this->v[$v];
}
}
$m = new Magic();
$m->d[] = 4;
echo $m->d[0];
ZhukovPeter
4 years, 11 months ago