Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77091 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42430 invoked from network); 7 Sep 2014 12:22:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2014 12:22:18 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.177 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 74.125.82.177 mail-we0-f177.google.com Received: from [74.125.82.177] ([74.125.82.177:46449] helo=mail-we0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/22-12208-9FD4C045 for ; Sun, 07 Sep 2014 08:22:17 -0400 Received: by mail-we0-f177.google.com with SMTP id u57so694824wes.8 for ; Sun, 07 Sep 2014 05:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hlfiEVFolNK+uM+Q+8MPh5z3qw7PC/gJ44PgkoxuurI=; b=L215izVA9mJWVblpCSwUT6cyF2ldc4NA7WDvUV00XAG23tzO3u68C2qALjphf/NE+J B8qAHVWXZxN6rFhhvWT8fWbDgwZ9C3xuWBoXt6d4OKfD3M+QZ7KFDymBeotCYEM/FFBl 4p9GLuK63bdADLtnyvpDAOrYKUiG3e8josjkTjWaXl0Ed2ppRv1Tg731VRlyLHdIY1QT zzW4ZpRC8Q5GLIPyyDxqKMyMEjAb9SmRjNfNmxtU0VpgKW+Tie+fnoY0jvD/eeGDPT1h /mxis92R3LjUVhDMGLzjkLQcHDpCSWt5+7SNkJCzVbvvLIcWgC6gDd5IKVBM3RqSJd1j vbXw== MIME-Version: 1.0 X-Received: by 10.194.185.81 with SMTP id fa17mr626750wjc.114.1410092534461; Sun, 07 Sep 2014 05:22:14 -0700 (PDT) Received: by 10.216.35.1 with HTTP; Sun, 7 Sep 2014 05:22:14 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Sep 2014 08:22:14 -0400 Message-ID: To: Pierre Joye Cc: Andrea Faulds , PHP internals Content-Type: multipart/alternative; boundary=047d7bae49569df8b8050278c0d1 Subject: Re: [PHP-DEV] [RFC] Implicit isset() in Shorthand Ternary Operator From: theanomaly.is@gmail.com (Sherif Ramadan) --047d7bae49569df8b8050278c0d1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I've played around with this branch for a bit and seems reasonable, passes the tests, and doesn't seem to have any serious issues/memories leaks AFAICT. I can't stress enough, however, how important it is for us to avoid inconsistencies in behavior between various forms of syntax. This is often something users complain of as often they complain about not getting such features. So let's make ternary consistent before we implement yet another oddity in PHP (half-assed and ill designed). I don't actually agree with the premise that ternary should wrap the first operand in empty() to begin with, but if this is what people want, fine. Let's just do it right. And as Rasmus mentioned in the PR, make the documentation very _cleary_ if it gets accepted. On Sun, Sep 7, 2014 at 6:30 AM, Pierre Joye wrote: > Hi Andrea, > > On Sep 6, 2014 2:03 AM, "Andrea Faulds" wrote: > > > > Good evening, > > > > I=E2=80=99ve written an RFC and working patch which attempt to add this= feature > which has been often requested: https://wiki.php.net/rfc/isset_ternary > > I did not look at the patch yet but I like it from a feature point of vie= w. > We should have had this since long :) > > Cheers, > Pierre > --047d7bae49569df8b8050278c0d1--