I would like to know what is the best/fastest way to deal with my functions:
Do I put them all in one file, and include the file with each page, or do I split them up, and include only the ones that are needed for that page?
I would appreciate feedback, couldn't find anything about this.
Question about functions: where to put them?
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
oft used functions should generally be stored together. Not so oft, in seperate, potentially page related, scripts.. or directly in the file they are used (if only called from a single script)
that's the general route I try to take. Try to avoid including too many files, as each requires php to load and parse that file, along with the harddrive seek time..
that's the general route I try to take. Try to avoid including too many files, as each requires php to load and parse that file, along with the harddrive seek time..