Re: include file identifier

From: Date: Tue, 06 Feb 2007 03:07:37 +0000
Subject: Re: include file identifier
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-248416@lists.php.net to get a copy of this message
On Mon, February 5, 2007 10:09 am, Craige Leeder wrote: > On 2/5/07, Richard Lynch <ceo@l-i-e.com> wrote: >> If you want to avoid the overhead of include_once, it's a pretty >> common practice (borrowed from C .h files) to do: > > Just out of curiosity, how much additional overhead are we talking > about? What version of PHP are we talking about? In its early days, it was very expensive, particularly if your code-base grew very large... Later, it was only expensive if your client was doing something whack like dynamically including hundreds of file snippets. (Don't ask.) These days, I would hazard a guess that it's as optimized as it can be, really, but you'd have to test and read source to be sure. Note that in all cases, the performance issue kicked in when you were including LOTS of different files, as the search space for what was already included grew. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#248416) next »