[wp-hackers] Should I always use reference when calling add_filter?

scribu mail at scribu.net
Sat Apr 21 22:48:02 UTC 2012


On Sat, Apr 21, 2012 at 9:34 PM, Ryan Chan <ryanchan404 at gmail.com> wrote:

> Why I am passing $this as reference if I do not expect it modify the
> value of $this? (I suppose it is bad), right?
>

Because in PHP4, if you didn't pass by reference, a new instance would be
created. I updated the Codex page.

-- 
http://scribu.net


More information about the wp-hackers mailing list