You're right, that wouldn't prove my point. However, you might try a little piece of code like the following:
<? $a="foo"; $b="bar"; $c="foobar"; if ($a=="foo") { include($b."php"); } else { include($c."php"); } ?> I hope this proves that includes are included at runtime because PHP wouldn't know what $b and $c are beforehand. Apart from that, I'm positive I read about it in a man page, but can't recall which, that's why I didn't direct you to it ;-) Bogdan John Holmes wrote: >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