Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51916 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78552 invoked from network); 16 Apr 2011 12:36:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2011 12:36:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=mail_ben_schmidt@yahoo.com.au; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mail_ben_schmidt@yahoo.com.au; sender-id=unknown; domainkeys=good Received-SPF: error (pb1.pair.com: domain yahoo.com.au from 98.139.52.220 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: mail_ben_schmidt@yahoo.com.au X-Host-Fingerprint: 98.139.52.220 nm23.bullet.mail.ac4.yahoo.com Received: from [98.139.52.220] ([98.139.52.220:36547] helo=nm23.bullet.mail.ac4.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5C/41-00728-F2D89AD4 for ; Sat, 16 Apr 2011 08:36:00 -0400 Received: from [98.139.52.194] by nm23.bullet.mail.ac4.yahoo.com with NNFMP; 16 Apr 2011 12:35:57 -0000 Received: from [98.139.52.141] by tm7.bullet.mail.ac4.yahoo.com with NNFMP; 16 Apr 2011 12:35:57 -0000 Received: from [127.0.0.1] by omp1024.mail.ac4.yahoo.com with NNFMP; 16 Apr 2011 12:35:57 -0000 X-Yahoo-Newman-Id: 68969.21362.bm@omp1024.mail.ac4.yahoo.com Received: (qmail 96315 invoked from network); 16 Apr 2011 12:35:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=aecFM6fiS0Rd6s9fM745fIIdfhnxVSbPzIJbj7gcByFLyOVuNCvaWZkFqPO6o3wNlXuVaL3PngfybuPYoCF8y9yvWbEhDSLlQMKvX1dl6Rg2dCGJW6HkHR+UJxBGYW3cKaSmBt01bZ4y+dLSMPVXAfDo63DjhwyNv5P3QqQYggk= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s1024; t=1302957356; bh=JzplvCmDhQ4UW9zrnaeyzOrJifOezWtT9jtfZsKT+6Q=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=4Gk5LRXvAMDrcEFa26iIpZd7qX4q8grdGzxD/mkqoBbJ8DZHjFsiunAFW2jNNvHDN+BeSszHs5QbxNbBLGb3jKFK9U4MCd1JWeqyQPrVSrlQnwFUGBvJV6GUBmLbjUC7Wu7Yjwgko67QC9e/isYn/niQl8HC/tBBtmHOEn9C1Zs= Received: from thought.local (mail_ben_schmidt@124.168.70.226 with plain) by smtp141.mail.mud.yahoo.com with SMTP; 16 Apr 2011 05:35:55 -0700 PDT X-Yahoo-SMTP: enFMnPSswBAexaHyzgobwuUTrYOhZdJ0KRA2SjA- X-YMail-OSG: EnAdwCkVM1mjHa9L11l0GJQIwbk20sMTUsSdVxLo8n4dFzx K4oOSszdxTnPflCU0Ats7.9IKysRTtOfmq.ACJ_ikr0VyDlipQkiAMsjRXwI 7KqpDdeicETTs0z.sH8S5w4yYuSfhSJUodu8iUxXDm66in2brUBVDeOaWqQO f8VFLDpx9JPF7FEqUIcrIxmBvE_C_eloA.BjNTt45zYmu0c5YRuj7KxZtnY9 Noleiz.3fgQPbLtDeGW6AmAhoJXtJxMXmN.qurtWG4yo9c4zBmgAoCATVtOx as8FObzW6QCwq9f3mo1hhEhhYwxwtJG_YmJUknKADJ4AkFzEgvwbQzpR7yZd c0XB6ceOjE4yzWt3nHh__Sb36LIg- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4DA98D34.1020909@yahoo.com.au> Date: Sat, 16 Apr 2011 22:36:04 +1000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: Adam Richardson CC: PHP Development References: <718216446.20110408143441@cypressintegrated.com> <4DA0E71C.9030008@gmail.com> <4DA63ED8.4080402@yahoo.com.au> <4DA6F2BC.10706@yahoo.com.au> <4DA6FB03.9040404@yahoo.com.au> <4DA8E6D9.5080107@yahoo.com.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator From: mail_ben_schmidt@yahoo.com.au (Ben Schmidt) > I believe describing nullness checking as a "main" issue is a rather > strong assessment. I don't think so, obviously. :-) > $var = (isset($arr['key'])) ? $arr['key'] : 'empty'; Nullness checking is half of what that code does, isn't it? Otherwise it would be (isset($arr['key']) && $arr['key']), right? > Additionally, it might not be as succinct as you prefer, but surely > > $var = $arr['key'] ?? : 'empty'; > > is a significant improvement over the current means and does in fact remove > redundant code. But it's not equivalent to your code snippet above, is it? My vote's still with the line of discussion Hannes and I were on, of separate 'careful array index lookup' and 'default-when-null' operator(s). Partly because I think that approach can help everyone, whereas the checked ternary operator really doesn't help me much at all. Not sure if that's selfish or not. :-) I'll try to stay a bit quieter for a bit, if I can manage it.... I've said a lot today. Returning due respect, Ben.