[wp-hackers] Best Way

Mike Schinkel mikeschinkel at newclarity.net
Thu Jun 25 03:58:43 GMT 2009

"Stephen Rider" <wp-hackers at striderweb.com> wrote:
> That's pretty much what I do, but I first do a function_exists() 
> on the function I actually need from that file.  If it doesn't 
> exist *then* I require_once().  (I'm told that require_once is 
> "expensive" in PHP.)

Interesting. I never knew that was a concern. To learn more I googled and found some interesting discussion on the topic, specifically http://stackoverflow.com/questions/186338/why-is-requireonce-so-bad-to-use

Evidently in more recent versions of PHP 5 (not exactly sure which subversion) the difference in performance is trivial.  But it's still useful to know, thanks.

> I don't claim it's the best system (yet... ;-)  ) but you might 
> take a look at Strider Core, perhaps it will give you some ideas.

Will do, thanks.


More information about the wp-hackers mailing list