Re: Assign array with __get
| From: | mathieu.suen | Date: | Fri, 26 Mar 2010 09:15:08 +0000 |
| Subject: | Re: Assign array with __get | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47639@lists.php.net to get a copy of this message | ||
Stanislav Malyshev wrote:
Hi!on possible example: class A { protected $foo; public function __get($name) {So what you're saying is that it is *consistent* with regard to the implementation of methods/functions, i.e. __get behaves as an ordinary method.Yes, it does. IMHO __get is not consistent at the first place.
echo 'GET';} public function test() {
return $this->foo;} } $a = new A; $a->foo; $a->test(); -- Mathieu Suen