[PHP] functions versus includes

2007-11-11 Thread Frank Lopes
I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what is faster: a function or an include? For example I have a block of text that needs to appear mutliple times throughout the site. Will I be

Re: [PHP] functions versus includes

2007-11-11 Thread Chris
Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what is faster: a function or an include? For example I have a block of text that needs to appear mutliple times throughout the

Re: [PHP] functions versus includes

2007-11-11 Thread Robert Cummings
On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what is faster: a function or an include? For example I have a block of

Re: [PHP] functions versus includes

2007-11-11 Thread Nathan Nobbe
On Nov 11, 2007 9:32 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what

Re: [PHP] functions versus includes

2007-11-11 Thread Chris
Nathan Nobbe wrote: On Nov 11, 2007 9:32 PM, Robert Cummings [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion

Re: [PHP] functions versus includes

2007-11-11 Thread Nathan Nobbe
On Nov 11, 2007 11:52 PM, Chris [EMAIL PROTECTED] wrote: As I said, it's a micro-optimization *shrug*. 0.0004 seconds difference over 10 iterations - wow ;) actually it was just one iteration; the output isnt very clear, but thats the value of a variable. anyway, i was surprised to see the

Re: [PHP] functions versus includes

2007-11-11 Thread Chris
Nathan Nobbe wrote: On Nov 11, 2007 11:52 PM, Chris [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: As I said, it's a micro-optimization *shrug*. 0.0004 seconds difference over 10 iterations - wow ;) actually it was just one iteration; the output isnt very clear, but thats the