Re: [PHP] efficiency of include()

2009-12-20 Thread Nathan Rixham
Daniel Kolbo wrote: > Larry Garfield wrote: >> On Sunday 20 December 2009 10:45:45 am Daniel Kolbo wrote: >>> Hello PHPers, >>> >>> This is a two part question: >>> >>> 1) Is it faster to include one file with lots of code, or many separate >>> smaller individual files? Assume the one massive file

Re: [PHP] efficiency of include()

2009-12-20 Thread Daniel Kolbo
Larry Garfield wrote: > On Sunday 20 December 2009 10:45:45 am Daniel Kolbo wrote: >> Hello PHPers, >> >> This is a two part question: >> >> 1) Is it faster to include one file with lots of code, or many separate >> smaller individual files? Assume the one massive file is merely the >> concatenati

Re: [PHP] efficiency of include()

2009-12-20 Thread Larry Garfield
On Sunday 20 December 2009 10:45:45 am Daniel Kolbo wrote: > Hello PHPers, > > This is a two part question: > > 1) Is it faster to include one file with lots of code, or many separate > smaller individual files? Assume the one massive file is merely the > concatenation of all the smaller individua

[PHP] efficiency of include()

2009-12-20 Thread Daniel Kolbo
Hello PHPers, This is a two part question: 1) Is it faster to include one file with lots of code, or many separate smaller individual files? Assume the one massive file is merely the concatenation of all the smaller individual files. (I am assuming the one massive file would be faster..., but i

Re: [PHP] Efficiency question

2006-08-04 Thread Richard Lynch
On Tue, July 25, 2006 11:41 pm, Paul Scott wrote: > I have googled around a bit, but not really found anything useful... > > Which is more efficient? A case switch or a $$method style method? > > An example: > > switch($action) { > case 'edit': > //do some stuff > ... > re

Re: [PHP] Efficiency question

2006-07-26 Thread Jochem Maas
Paul Scott wrote: > I have googled around a bit, but not really found anything useful... > > Which is more efficient? A case switch or a $$method style method? > both examples are just boilerplate 'frontcontroller' code that do pretty much nothing of themselves. - in terms of speed you will no

Re: [PHP] Efficiency question

2006-07-26 Thread Rory Browne
For something like that that, unless you are doing it inside a loop, I wouldn't really worry about efficiency as much as I would about security On 7/26/06, Paul Scott <[EMAIL PROTECTED]> wrote: I have googled around a bit, but not really found anything useful... Which is more efficient? A cas

[PHP] Efficiency question

2006-07-25 Thread Paul Scott
I have googled around a bit, but not really found anything useful... Which is more efficient? A case switch or a $$method style method? An example: switch($action) { case 'edit': //do some stuff ... return "edit_tpl.php"; case 'whatever': //blah ..

[PHP] RE: use of mysql_free_result (was Re: [PHP] Efficiency)

2002-09-19 Thread Tim Ward
www.chessish.com > -Original Message- > From: Support @ Fourthrealm.com [mailto:[EMAIL PROTECTED]] > Sent: 19 September 2002 01:18 > To: [EMAIL PROTECTED] > Subject: use of mysql_free_result (was Re: [PHP] Efficiency) > > > Rick, or anyone, > > Based on w

Re: [PHP] use of mysql_free_result (was Re: [PHP] Efficiency)

2002-09-18 Thread Chris Shiflett
This frees the memory that is used to store the results of your query (the $result variable in most examples). Many people leave this out, because PHP does a lot of cleanup for you when your script exits. However, it is a good habit to go ahead and free your results once you are finished using

[PHP] use of mysql_free_result (was Re: [PHP] Efficiency)

2002-09-18 Thread Support @ Fourthrealm.com
Rick, or anyone, Based on what you said below, can you describe for me when the mysql_free_result tag should be used, and when it is not necessary? I'm fluent in other web languages (iHTML, ASP), but am fairly new to PHP, so I'm still learning the intricacies of the language, and the best way

Re: [PHP] Efficiency

2002-09-18 Thread Rick Widmer
At 04:41 PM 9/18/02 -0400, Support @ Fourthrealm.com wrote: >Which is more efficient? Considering that the difference in efficiency is so small, a more important question is which is clearer to the programmer? I prefer b, except that I allow short tags and use the magic print/echo function:

[PHP] Efficiency

2002-09-18 Thread Support @ Fourthrealm.com
Which is more efficient? a) a sql loop where everything is displayed/formatted using echo stmts, like this: $result = mysql_query("SELECT * FROM news WHERE active=1"); while ($row = mysql_fetch_object($result)) { echo "$row->title "; } mysql_free_result($result); ?> OR b) a sql loop