Andrei Zmievski wrote:
If you get to the point where your function has a dozen parameters, I would suggest re-thinking the purpose and design of such a function, because you are likely trying to make it do too much.
Obviously for most methods you should not require more than say 5 parameters. But there are the extremes .. say a query builder and you dont want to use a fluent interface ;-)
Sometimes you can come up with a very concise method that proxies calls to other methods and therefore needs quite a ton of (often optional) parameters. Obviously you can use arrays and things like that to not force the user to remember the exact parameter order, but it means adding alot of code for managing defaults and incorrect parameters.
regards, Lukas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php