Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51969 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85297 invoked from network); 21 Apr 2011 00:04:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Apr 2011 00:04:39 -0000 Authentication-Results: pb1.pair.com header.from=arraypad@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=arraypad@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arraypad@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:43497] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/80-24878-6947FAD4 for ; Wed, 20 Apr 2011 20:04:39 -0400 Received: by vxb40 with SMTP id 40so1025342vxb.29 for ; Wed, 20 Apr 2011 17:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=kSplHzjt5G+EiHALe8Hno28gauLh1W5RL62gZQbUq5c=; b=vC19HXWZJ7AfFBDwdGWIYZM3N58S4MmOXb78Zrpgh8LibjfCSZHXucTMyQKbPXaKU7 QOd3l1Iug40JjTyfvF9N7o7qCx7uyJsvy3B0Y8T57VlEPfBr0aJVlQ9eGOz9PM26a8RR AP8rSX9rY9skoj1HzALw6agHIWLIA8HJtKwR0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=DnVhJRWcv124YC1xgH53b5EIfntP2igKMscRztCKUYLkTvxUMv9CODFS57HrgKR2Ol f8vTp5gglbhaFoLMxYE/QkCuuA9GPdd9WCmcpoBGi1sDo3dMZH/f0bGCkfqNM0fdwksS c2qytyDRIsa1HlOQEhS1f6r/SCD2MNdpNoUio= MIME-Version: 1.0 Received: by 10.52.113.70 with SMTP id iw6mr301669vdb.46.1303344275856; Wed, 20 Apr 2011 17:04:35 -0700 (PDT) Received: by 10.52.107.98 with HTTP; Wed, 20 Apr 2011 17:04:35 -0700 (PDT) In-Reply-To: References: <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> <4DA63ED8.4080402@yahoo.com.au> <4DA6F2BC.10706@yahoo.com.au> <4DA6FB03.9040404@yahoo.com.au> Date: Thu, 21 Apr 2011 01:04:35 +0100 Message-ID: To: Hannes Landeholm Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator From: arraypad@gmail.com (Arpad Ray) On Thu, Apr 21, 2011 at 12:56 AM, Arpad Ray wrote: > I've pined for something like coalesce($_GET['foo'], $defaults['foo'], > 42) for years, and I think that style is far more in keeping with the > PHP ethos, and far more readily understandable than this suggested new > syntax. > To elaborate, I'd probably think this code was an unlikely series of typos, or an encoding error: $var = $_GET[?'var'] $: $_POST[?'var'] $: 'default'; But as a PHP coder, I'm quite familiar with how coalesce() works. Regards, Arpad