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:[EMAIL PROTECTED]] > Sent: Saturday, June 01, 2002 11:12 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > 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. > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php