Re: RFC: allow_call_pass_by_reference

From: Date: Thu, 22 May 2008 11:13:41 +0000
Subject: Re: RFC: allow_call_pass_by_reference
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-37797@lists.php.net to get a copy of this message
On Thu, May 22, 2008 at 2:51 PM, LEW21 <lew21st@gmail.com> wrote: > 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? > Then I would say "that is a bad design" -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

« previous php.internals (#37797) next »