Re: Modify language grammar to allow commas to skip defaulted parameters.

From: Date: Tue, 22 Jul 2008 15:21:31 +0000
Subject: Re: Modify language grammar to allow commas to skip defaulted parameters.
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-39194@lists.php.net to get a copy of this message
Richard Quadling wrote: > Actually, would allowing PHP to skip defaulted parameters be a better > facility to add? > > function foo($opt1 = Null, $opt2 = Null){} > > foo(,True); I agree that it would be ugly but possibly useful. OTOH I think it's better to switch to named parameters in such a case anyway. But actually it's orthogonal to the original question whether trailing commas are allowed or not so I'd suggest starting a new thread if you want to change the topic ;-) - Chris

« previous php.internals (#39194) next »