[PHP] Includes vs. Functions

2002-07-17 Thread Monty

I generally prefer to include various blocks of code in templates using
include_once() rather than load a functions library and make calls to those
functions within the script.

Is there a big difference in efficiency and speed of includes vs. custom
functions? I like includes because it's easier to drop blocks of code in a
page design without disrupting the design of the page very much.

Thanks,

Monty


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Includes vs. Functions

2002-07-17 Thread 1LT John W. Holmes

The only difference I can think of is that if you included everything at
once, in function or whatever, then that's only 1 file open and read. if
you're doing a bunch of includes all over the place, then your doing more
file open and reads. Not sure if it really affects your script in the grand
scheme of things. the actually processing of the code should outway most of
it, anyhow...

---John Holmes...

- Original Message -
From: Monty [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 4:32 PM
Subject: [PHP] Includes vs. Functions


 I generally prefer to include various blocks of code in templates using
 include_once() rather than load a functions library and make calls to
those
 functions within the script.

 Is there a big difference in efficiency and speed of includes vs. custom
 functions? I like includes because it's easier to drop blocks of code in a
 page design without disrupting the design of the page very much.

 Thanks,

 Monty


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php