RE: [PHP] Functions
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Tue, 26 Sep 2000 09:22:30 +0000 |
| Subject: | RE: [PHP] Functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17564@lists.php.net to get a copy of this message | ||
I usually categorize my include files by what they do.
So my template functions are in template_functions.php, cookie functions in
cookie_function.php
Speed wise, loading less files is faster, although if you have hundreds of
functions this may change ;)
What I generally do is include my most used functions by default in every
file I write, then use
include_once ("filename");
to make sure its only loaded once.
You could look at using classes instead, but i've found that to be slower
programming than using pure functions.
-----Original Message-----
From: Abe Asghar [mailto:abe@fish.tm]
Sent: September 26, 2000 05:21 PM
To: PHP General List
Subject: [PHP] Functions
Hello everyone,
Just a quick question:
I am using an include file (others.inc) with a function I wrote in it. As I
am writing more functions should I keep them in the same others.inc file or
have them in different ones. Having all functions in one file would be
easier to maintain but would it cause performance problems.
Any advice would be kindly appreciated.
Thaks
Abe.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net