Re: [Coding Standards] Loading all files at once
| From: | Lukas Kahwe Smith | Date: | Tue, 10 Jul 2007 19:20:42 +0000 |
| Subject: | Re: [Coding Standards] Loading all files at once | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47414@lists.php.net to get a copy of this message | ||
On 10.07.2007, at 19:35, Travis Swicegood wrote:
Lukas Kahwe Smith wrote:my statement is correct. if(class_exist()) has nothing to do with my statement. regards, Lukasthe point is that its not just about allfiles.php, but that you actually do not want the require_once calls, because they are just useless overhead if you use an allfiles.phpActually Lukas, that's not entirely correct. While require_once does provide some overhead, it provides less overhead than doing an if(class_exists()) at the top of every file to insure that the required classes were properly loaded. The benchmark, while I'll admit is very naive, proves that require_once was faster than two straight up requires.