RE: [PHP] Include question
| From: | John Holmes | Date: | Sun, 02 Jun 2002 04:10:27 +0000 |
| Subject: | RE: [PHP] Include question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100280@lists.php.net to get a copy of this message | ||
The global var wouldn't work. Even if both are loaded into memory before
the script is ran, only one include will actually be executed along with
the code, so only one would end up affecting a global var either way.
What I'm looking at is if each include .html file is 50K, am I loading
100K into memory and then running the script, or running the script and
only loading the appropriate 50K into memory when it's needed?
---John Holmes...
> -----Original Message-----
> From: Bogdan Stancescu [mailto:mgv@fx.ro]
> Sent: Saturday, June 01, 2002 11:12 PM
> To: holmes072000@charter.net
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Include question
>
> Your second guess. But you could've tested it easily with two includes
> appending stuff to the same global var.
>
> Bogdan
>
> John Holmes wrote:
>
> >Hi. When I've got code like the following:
> >
> >if($this) { include("this.html"); }
> >elseif($that) { include("that.html"); }
> >
> >When are the includes() evaluated? Does the Zend engine do the
includes
> >first, pull in all of the code, then process it and produce output.
Or
> >does the engine start processing the code and only load the includes
> >when it gets to them?
> >
> >Thanks for any explanations.
> >
> >---John Holmes.
> >
> >
> >
>