NYCPHP Meetup

[nycphp-talk] require_once paranoia?

Michael B Allen ioplex at gmail.com
Sat Nov 1 12:12:40 EDT 2008


I've seen numerous references that calling require_once is slow. Zend
Framework is very strict about not calling require_once unless
absolutely necessary (e.g. for exceptions).

In item 3 in this blog post:

  http://till.vox.com/library/post/zendframework-performance.html

the author claims switching to __autoload chopped 220 ms off request times.

Why is this so? If you do not call require_once until you actually
need the class, I fail to see why __autoload would make any difference
as you still need to read the file from disk and interpret it either
way.

Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/



More information about the talk mailing list