On 09/29/02, "Jean-Christian Imbeault" <[EMAIL PROTECTED]> wrote:
> Shucks ... I take it that you are familiar enough with the source so 
> that I can take this to be a pretty definitive answer?

Yep.
 
> If so ... maybe you can suggest something to me then?
> 
> I find myself including() the same constants.inc file in all my scripts, 
> is there a way to declare static constants that remain even when a 
> script exits? (I am using PHP as an Apache module).

If you write an extension module, yes, although this could be considered
overkill, and you'll probably find that the maintenance cost outweighs
the runtime speed benefits.

Your OS should do a reasonable job (or a really good job if it's Unix based)
at caching the file contents and the ZE is pretty fast at spotting inline
HTML in your php files, so I wouldn't worry so much about the performance
of this aspect, unless you have some real CPU-intensive code in your
frequently included files, or a large number of hits.

If that is the case, consider using APC (if you don't want to pay money),
or the Zend Accelerator (if you have some money, or if your site is a
non-commerical community site - see zend.com for details).

--Wez.


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to