Re: Re: include/require vs performance
| From: | Stephan Seidt | Date: | Fri, 03 Jan 2003 13:41:36 +0000 |
| Subject: | Re: Re: include/require vs performance | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130090@lists.php.net to get a copy of this message | ||
I guess that PHP will close file 1 before it opens
file 2 and so on.. For example :
include 'foo';
include 'bar';
When bar is being opened foo is already closed.
Leon Mergen wrote:
"Radek Zajkowski" <info@finalbanana.com> schreef in bericht news:php.general-130083@news.php.net...-- I won't pay Bills'Is there, was there ever issue around including a lot files via include(). I am running things on a local server so it's hard to gauge.I think that the only source that could cause any problems with too many files included will be your operating system (since that thing has certain limitations on a max number of locked files for example) . Other than that, I don't think so. I myself include about 15 files on certain pages. But it is easy to make a test or anything... Just make a PHP script that generates like 1000 php scripts called "include.test.x.php" , where x is is a number, then the contents of those scripts should by "<? include("include.test." . (x+1) . ".php");?>" or something like that... Then you are for sure, and you immediately also know how much performance is lost for including 1000 files :)