Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-16 Thread Rob Paxon
far, far less than %50 of visitors. In the end, it works out to the database only being opened when needed and I've found this to make dramatic difference, even on my sorry old local enviroment. I'm glad to see this topic got so many different responses. Thanks fellas - Rob Paxon --

Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-15 Thread Rob Paxon
time I do my "spring cleaning"--which probably won't have the coincidence of falling near spring again--I'll run with it. - Rob Paxon Tom Rogers wrote: Hi, On a busy site (where the milliseconds start to matter) the chances are that the operating system has your include files ca

Re: [PHP] Efficieny: Include vs Array vs Function

2004-03-15 Thread Rob Paxon
Thanks for the reply. In my case there aren't many external files associated with the script. 1 css file per site and no images except on a few very specific pages. Adding images does not negate the shaved microseconds. I see what you mean, but it doesn't literally negate the saved load. Th

[PHP] Efficieny: Include vs Array vs Function

2004-03-15 Thread Rob Paxon
ed in memory with a function versus an array? Would one choice be more efficient on a virtual server, while another more efficient on a dedicated (because of memory considerations)? I'm going to just assume the database is not the most efficient choice here. Thank you to all those who wil

Re: [PHP] Adverse performance of undefined variables and indexes?

2004-03-01 Thread Rob Paxon
Robert Cummings wrote: It's more efficient not to have a custom error handler... when your code fires notices and warnings etc. Well written code won't fire any errors or warnings. Well maintained code won't fire notices. So if you have well written and well maintained code... the overhead is negl

[PHP] Adverse performance of undefined variables and indexes?

2004-03-01 Thread Rob Paxon
nd I realize it is better practice to do case c, but as this code is for my eyes only (and I'm the one who has to redo everything should a 'better practice' become mandatory), I am only concerned with the performance, not the sound practice. - Rob Paxon P.S. (offtopic) Speak

[PHP] Using Chr() on Characters Over 255

2004-01-26 Thread Rob Paxon
XHTML specifications state that certain literal characters must be represented as their entity, as in ", etc. The function htmlentities() only encodes a few of them. I wrote a function that uses an array of all special characters listed in the XHTML specification and the html entity code for

[PHP] What is the fastest method for changing php settings (save php.ini)?

2003-03-14 Thread Rob Paxon
I'm sorry if this question has been answered before, but I couldn't find anything in the archives. I don't have access to php.ini and I was wondering which method for changing settings is the fastest. Take, for example, "session.cache_expire". This can be set via ini_set(), session_cache_exp

[PHP] Does using msql_select_db excessively burn resources?

2002-12-03 Thread Rob Paxon
I plan to have my sites using several databases, but there is a common database they must all use. Obviously I'll have to use "mysql_select_db" each time I change the database I wish to use. Does this simply select the database and hold it as a variable until a query is made, or does it load i

[PHP] Sessions, Cookies, and Subdomains

2002-12-02 Thread Rob Paxon
Hello, I've a bit of a problem and was wondering if anyone out there can help straighten it out. I have never worked with cookies or php sessions before as the need for such has never presented itself before. Up until this point I have been using a very customized version of PostNuke but thing