include file mystery
Posted on 12 September 2008 by Abidoon
Whats faster ?
1 – include
2 – include_once
3 – require_once
When I benchmarked our application the php execution time was smallest with include.
That seems to make sense since in the other two options php has to check if the file was included previously or not.
However, we also found significant differences between include_once and require_once. Anyone care to shed some light on why that was happening?
FYI our version of php uses x-cache. I wonder if that has anything to do with it.
Tags | include, include_once, PHP, require_once, x-cache
