3 ms·
Hmm, PHP 5.2+ is still that slow with require_once ? I thought they fixed that. Anyway, just use function_exists instead.
by ck2 16y ago
Hmm, PHP 5.2+ is still that slow with require_once ?
I thought they fixed that.
Anyway, just use function_exists instead.
- bkrausz 16y agoYup, we're on 5.3. May have something to do with the relative vs. absolute paths (we use relative), but still... Turns out we didn't need require_once anyway, all but a couple of includes in our entire codebase were in that one area.
- nbpoole 16y agoOut of curiosity, what does your include_path look like? Is ./ the first element, the last, or somewhere in the middle?
- bkrausz 16y ago. is the first entry
- wvenable 16y agoAs quickly as possible I turn relative paths to absolute paths (with __DIR__) to avoid any more overhead there. I also empty the include path; no need to have PHP searching for files all over the place.