Re: [RFC] skipping optional parameters

From: Date: Wed, 18 Apr 2012 00:03:27 +0000
Subject: Re: [RFC] skipping optional parameters
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-60140@lists.php.net to get a copy of this message
Hi, On Wed, Apr 18, 2012 at 01:56, Stas Malyshev <smalyshev@sugarcrm.com> wrote: > Hi! > >> Since func_num_args() won't be able to be used to see if an argument is set, could a >> func_isset_arg() be added? So something like: >> if(func_num_args() > 2) $value = func_get_arg(2); >> would become: >> if(func_isset_arg(2)) $value = func_get_arg(2); > > I think it's easier to just do func_get_args() and check for isset there > :) You usually don't have too many args so getting all of them is not a > big problem. > +1 BTW: the diffs show a lot of WS changes that you should probably fix. Best, > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Etienne Kneuss http://www.colder.ch

« previous php.internals (#60140) next »