Re: Rethink CS for require_once?

From: Date: Wed, 01 Dec 2004 17:20:55 +0000
Subject: Re: Rethink CS for require_once?
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-34706@lists.php.net to get a copy of this message
Greg Beaver wrote:
Andrew Nagy wrote:
I don't know if this has been discussed before, but what about using just require for internal packages and require_once for external? Rasmus Lerdorf mentioned at a PHP conference that require_once is really slow and should be avoided at all costs. Considering the app programmer most likely will not be including files buried deep with in a pear package, this may be more beneficial?
I think the disadvantages outweigh the benefits - remember, I'm not looking for a performance gain, that's just an added benefit in some situations. Most important is the security of knowing that internal files will only come from one place.
I still dont see how your solution will work around the issues stated in Stig's post that Alan linked to. Also remember that different packages will include a given package. So you also need to take into account that its not always the user that includes a given package. regards, Lukas

« previous php.pear.dev (#34706) next »