Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51855 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80897 invoked from network); 10 Apr 2011 14:46:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Apr 2011 14:46:09 -0000 Authentication-Results: pb1.pair.com header.from=olemarkus@olemarkus.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=olemarkus@olemarkus.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain olemarkus.org from 213.236.166.183 cause and error) X-PHP-List-Original-Sender: olemarkus@olemarkus.org X-Host-Fingerprint: 213.236.166.183 unknown Received: from [213.236.166.183] ([213.236.166.183:37335] helo=remus.fluks.no) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/30-12572-BA2C1AD4 for ; Sun, 10 Apr 2011 10:46:04 -0400 Received: from localhost (localhost [127.0.0.1]) by remus.fluks.no (Postfix) with ESMTP id 45B39502345; Sun, 10 Apr 2011 16:45:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at fluks.no Received: from remus.fluks.no ([127.0.0.1]) by localhost (remus.fluks.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UcKeIEbNGPoe; Sun, 10 Apr 2011 16:45:56 +0200 (CEST) Received: from localhost (131.33.34.95.customer.cdi.no [95.34.33.131]) by remus.fluks.no (Postfix) with ESMTPA id 922B0502301; Sun, 10 Apr 2011 16:45:54 +0200 (CEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net, "Rune Kaagaard" References: <4D950434.3060704@yahoo.com.au> <4D9E0543.1080600@lerdorf.com> <69.82.36433.EC33E9D4@pb1.pair.com> <4D9E34C4.5000406@lerdorf.com> <4D9E429B.20503@sugarcrm.com> <4D9E96B6.6060401@lerdorf.com> <718216446.20110408143441@cypressintegrated.com> <4DA0E71C.9030008@gmail.com> Date: Sun, 10 Apr 2011 16:45:35 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: User-Agent: Opera Mail/11.00 (Linux) Subject: Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator From: olemarkus@olemarkus.org ("Ole Markus With") On Sun, 10 Apr 2011 16:04:06 +0200, Rune Kaagaard wrote: > Hey again > > Updated here as always https://gist.github.com/909711. I've tried to > write down the goal of this new feature. Which patterns do we want to > make easier to write? > > Do you agree with the goals I've set? > I think these shortcuts could be really useful for array elements, but for other variables I am really sceptical and I think they would do more harm than good. Generally I do not really see any reason why a variable should not be 'instanciated' before use. So +1 if this shortcut is implemented to only work for array elements. -1 for any other variable type. -- Ole Markus With