Re: Re: Rethink CS for require_once?
| From: | bertrand Gugger | Date: | Wed, 01 Dec 2004 16:50:00 +0000 |
| Subject: | Re: Re: Rethink CS for require_once? | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34704@lists.php.net to get a copy of this message | ||
Greg Beaver wrote:
Andrew Nagy wrote:'require ...' instead of 'require_once ...' is a way for coder to assert that the former protecting 'require_once "PEAR:pckg.php"' (from user) mechanism is working, else it's breaking. -- bertrand Gugger (toggg)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. Greg I would just mind that