On 12 April 2010 13:42, Gregory <greg...@gregory.net> wrote: > PS: Also, what do you guys think of an additional (optional) possibility: > > function myFunc($a, $b, ...$options) // sort of like Java > > and this way $options can be filled, so people don't have to keep using > func_get_args to get all the arguments.
If $options is just another array to the function, then it would be my responsibility to process $options. If $options is the array of named parameters, how would I differentiate/docblock/autodoc/etc. Maybe func_get_named_params() (or something shorter) would be more suitable. Or would it matter? From the userland perspective, it would seem the purpose is to allow out-of-order and/or skipped parameters. Once the function is called, tools like func_get_args(), reflection, et al. should all work as if I hadn't used named parameters. If I had, then maybe func_get_named_params() and reflection would be the "proper" way to determine the named params. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php