Re: [PATCH] array_get()

From: Date: Wed, 12 Sep 2007 08:13:32 +0000
Subject: Re: [PATCH] array_get()
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-32282@lists.php.net to get a copy of this message
Hello Robert, yeah ifsetor if much better than the @-?: combination. But for 5.3 that would be all we could do. For 6 and in the long run we might do a real ifsetor. If ever we could come to a consensus... and no i don't really like to restart discussions on ifsetor at this point. marcus Tuesday, September 11, 2007, 7:17:02 PM, you wrote: > On Tue, 2007-09-11 at 18:54 +0200, Marcus Boerger wrote: >> Hello Andrew, >> >> how about @<expression>?:<default> style? >> >> Like: $val = $myarray[$key] ?: $default; > Did you mean like: > @$val = $myarray[$key] ?: $default; > Because that's an expensive assignment since it will hit the error > handler when the index is not assigned. I thought the ifsetor system was > going to throttle undefined index notices for the left operand. > Cheers, > Rob. > -- > ........................................................... > SwarmBuy.com - http://www.swarmbuy.com > Leveraging the buying power of the masses! > ........................................................... Best regards, Marcus

« previous php.internals (#32282) next »