Re: Re: [RFC] ifsetor operator

From: Date: Fri, 16 Apr 2004 20:22:03 +0000
Subject: Re: Re: [RFC] ifsetor operator
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-9281@lists.php.net to get a copy of this message
On Fri, 16 Apr 2004, Christian Schneider wrote: > Derick Rethans wrote: > > isset() works on a variable only too, so this behavior matches already > > existing behavior. > > Hmm... this brings up another idea: > Extend isset to have this behaviour. Funnily enough when I was thinking > about such a feature I wished I could call it isset. And now I realize > that we could: > Extend isset to accept multiple arguments and make it return the value > of the first non-null it any. > Backward compatible for everything but variations of the horrible > if (isset($a) === true) > > This would lead to > $a = isset($b, 'default'); I think this is the sanest suggestion yet. -Rasmus

« previous php.internals (#9281) next »