[thelist] PHP User Defined Functions

Kristy Frey kristenannfrey at yahoo.com
Wed Jan 2 10:49:22 CST 2002


--- Allie Micka <allie at pajunas.com> wrote:
> PHP itself acts this way.  Imagine how inefficient the coding and processing
> of any PHP script would be if you had to include a file for each of its
> 1000s of native functions!

Let's say I will never have more than 100 user defined functions.  To what degree would the
difference in efficiency be for:

1. Including 100 small files at the beginning of a script
OR
2. Including 1 large file that contains 100 functions (which for me is harder to maintain)
OR
3. Including only the files for the functions I need in the script at the time that I need them.
(Of my 100 or so user defined functions I may only use 5 - 10 of them in any given script.)

I fear the debate of efficiency vs. organization of code that may arise here...but...

I want to be efficient, but I also want my sites to be easy for others to maintain.  I am the sole
web developer at this time (I was thrown into the role when our web developer quit - after he
finally spun himself a web of code that even he could not maintain).  

I swear our old web guy used this web site on how to write unmaintainable code as his guide:
http://mindprod.com/unmain.html

Thanks Again!
Kristy

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com




More information about the thelist mailing list