note 104157 deleted from language.oop5.autoload by danbrown
| From: | danbrown@php.net | Date: | Tue, 31 May 2011 17:31:10 +0000 |
| Subject: | note 104157 deleted from language.oop5.autoload by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180140@lists.php.net to get a copy of this message | ||
Note Submitter: netmosfera at gmail dot com
----
use file_exists or is_file is really slow for file inclusions
function loader($className)
{
// build the $classNameFile here
@include $classNameFile;
return class_exists($className, false);
}
is a lot faster!
on my sys 24 inclusions with file_exists:
~ 0.0326s
without file_exists:
~ 0.0085s