>What is the best way to pass the arguments so it is easy to maintain in >future if function behaviour changes by adding/removing one or more >arguments? > >Currently i am passing arguments in array. But i think it is not the >clean way to do it and another approach i am using is functionName(arg1, >arg2='', arg3='') but here again i think it is not easy to maintain.
According to http://php.net/manual/en/functions.arguments.php, Variable-length argument lists PHP 4 has support for variable-length argument lists in user-defined functions. This is really quite easy, using the func_num_args(), func_get_arg(), and func_get_args() functions. No special syntax is required, and argument lists may still be explicitly provided with function definitions and will behave as normal. --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php