I have a function to process a data file.  This process opens the file, and 
then calls
another function to process each entry.  This function in turn calls another 
function to
process each line of the entry.  A set of fairly complex arrays specifies how 
all the
possible types of entries and lines should be processed, and each function 
passes sections
of these arrays to the next function.

Is it better to pass the parameters by value, in which case they have to be 
copied into
yet more memory when the function is called, or to pass by reference, which I 
suspect may
involve additional overhead every time they are accessed?

And is it better to combine several specifications arrays into one more complex 
array, and
pass a single parameter, or to pass them individually as half a dozen different

I suspect that I am probably asking a "how long is a piece of string?" type of 
but are there any general rules which are applicable to this type of situation?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to