Re: [PATCH] array_get()

From: Date: Tue, 11 Sep 2007 17:17:02 +0000
Subject: Re: [PATCH] array_get()
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-32264@lists.php.net to get a copy of this message
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! ...........................................................

« previous php.internals (#32264) next »