Do PHP objects use getters and setters internally?

Posted by Andrew McCombe on Tue Jul 26, 2011

I just came across something that made me wonder wether a PHP object uses the magic __get() and __set() methods inside the object itself.  I wrote the following code to test:

Here’s the output:

Answer: Yes they do!