Including Functions; one file or many?

From: Date: Fri, 26 May 2006 08:02:14 +0000
Subject: Including Functions; one file or many?
Groups: php.general 
Request: Send a blank email to php-general+get-236929@lists.php.net to get a copy of this message
Hi I'm writing a set of db abstraction functions for an internal app which will give us a set of simple function calls for dealing with the db, like $result = db_AddEmployee($EmployeeData); $EmployeeData = db_GetEmployee($EmployeeID); etc. There will be quite a few functions needed to deal with all the different ways the app touches the db, so my question is: Am I better off putting all these functions into one big include file (which could get pretty big) or using a seperate 'include' file for each function? I'm thinking about the tradeoff between simplifying code by only having a single include file (parsing a lot of functions that aren't used, but less disk access) and having several include files (no extra funcs but lots more disk access). I realise there probably isn't a 'correct' way to do this, I'm curious about which methods folk here use in situations like this. TIA in advance for any advice, Mark

« previous php.general (#236929) next »