Categorized | PHP

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 | , , , ,

Leave a Reply


 

September 2008
M T W T F S S
« Mar   Oct »
1234567
891011121314
15161718192021
22232425262728
2930