When reviewing some code, I found the following construct, specifically the array ($this[$key]). How does it work? Where does it put the values? Where can I find it documented?
public function __get($key)
{
return $this[$key];
}
Answer: Thanks Mario. It's implemented by adding the ArrayAccess interface to the object and implementing offsetGet and offsetSet methods.