Re: Rethink CS for require_once?
| From: | Andrew Nagy | Date: | Wed, 01 Dec 2004 14:22:01 +0000 |
| Subject: | Re: Rethink CS for require_once? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34689@lists.php.net to get a copy of this message | ||
Greg Beaver wrote:
Hi, I would like to suggest a simple and compelling change into the CS for require_once in PEAR packages. Currently, all internal inclusion of PEAR files must be done like require_once 'Relative/Package/FilePath.php'; I'd like to revisit this CS and split it into two kinds of includes: 1) inclusion of internal package files 2) inclusion of external package files definitions: 1) internal package files drivers internal extensions (PEAR_Command commands, PEAR_PackageFile_v1 any internal file that must not be changed (can be considered final) 2) external package files *any* file that is not in the package.xml any internal file that can be user-customizedI 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? Has this been discussed? Andrew