[wp-hackers] Passing class methods by reference

Mike Schinkel mikeschinkel at newclarity.net
Fri Aug 6 21:25:55 UTC 2010


On Aug 6, 2010, at 5:20 PM, Michael D Adams wrote:
> Sorry - I meant compared to straight functions.  The context (in my head) was
> 
> $object_i_can_use = My_Class::instance();
> vs.
> $object_i_can_use() = my_class_instance();
> 
> Where the former stores the as a static property or variable, and the
> later accesses a previously created global.
> 
> I didn't actually benchmark that specific scenario, though, so I
> probably shouldn't even have mentioned it :)

I guess the important question is, is the performance different significant enough to matter in the context of WordPress plugins?  IOW, just how much slower for a larger WordPress installation?  I dunno...

-Mike



More information about the wp-hackers mailing list