Re: RFC: allow_call_pass_by_reference
| From: | LEW21 | Date: | Thu, 22 May 2008 10:51:31 +0000 |
| Subject: | Re: RFC: allow_call_pass_by_reference | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37796@lists.php.net to get a copy of this message | ||
2008/5/22, Alexey Zakhlestin <indeyets@gmail.com>:
> On Wed, May 21, 2008 at 10:46 PM, LEW21 <lew21st@gmail.com> wrote:
> > Sometimes call time pass by reference is useful, for example when you
> > want to make it possible to omit an param (normally passed by
> > reference) by setting null. With no call time pass by reference,
> > programmers are required to write:
> >
> > $null = null;
> > foo($null);
>
>
> what stops you from declaring:
>
> function someFunc(&$param = null)
> {
> }
>
> it works just fine
And what if this param isn't the last param of this function, and next
params are required?