> >Chris, thanks for describing your method. The reason I really dislike > >Functions in PHP is because you have to pass every variable needed by a > >function, even if that variable is global in the main script, which is a > >pain in the ass when a function needs a long string of variables. It makes > >it easier to forget a variable in the list and can make the code look messy.
[snip] > The whole idea behind modularization is that you are creating a "black > box" so to speak, a chunk of code that performs one function, and one > function only. It should present a *minimal* interface to the outside > world. This means that if I have a black box that say, gives me the > current local time in a particular timezone, I should be able to feed > it the name of the timezone, and it should give me back the current > time. I should NOT have to know how it works inside, or care. I feed > it one value, and it returns another value. [snip] To add to this. If you're passing too many values to a function, then maybe that function isn't broken down enough. I remember hearing/reading that if you need to pass more than, I think, 5 or 6 values to a function, then you're passing too many. Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php