[/snip]Maybe you could group them by purpose and put them into different include files. Then you just include the file containing the functions you need at this point in the script.
Regards, Torsten Roehr
The functions are already grouped in different files, but even then, not all the functions included are used every time. The thing is, that there's too many different values for $action and each has it's own set of functions used. So creating an include file tailor-made for each one is a bit difficult, specially since many functions are used in more than one action.
So I thought that maybe I could only define the needed ones in each case, although there's more in the include file. Example:
if ($in_array('Hello', $functionArray)) { function Hello() { echo 'Hello'; } }
I understand that the whole php file will be parsed, or does the parser skip the whole block inside the if when the condition is not met? But even if it is parsed, if the condition is not met, I believe that the function won't be defined, so I assume this would at least save RAM or something, right? Or not at all?
TIA, Anguz
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php