Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60399 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94529 invoked from network); 1 May 2012 16:52:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 May 2012 16:52:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:41424] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/09-38165-CB410AF4 for ; Tue, 01 May 2012 12:52:13 -0400 Received: by pbbrp12 with SMTP id rp12so3481704pbb.29 for ; Tue, 01 May 2012 09:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1TjSsCm1aaZAOiQjz3woX+8HIsk/YoWb4DXkjmENf6U=; b=QvGk8NhtbK/huobKaPz3707oHqBsJzPNmolve2Tku2mufebgP6/NWMbD1YJbQIz8wg Qdwf4KZV1jMoXJzPa6ohs/HPb7Ldgu22UQLgRaIp9dGPH23/kpfyhvdJZW5bOLIfzeXo woaGyuOQBWLlEMrNXv6oq7FzX1ElBXcHT4TiSSADNxQGRe7yuhCX6LBDErWGBLn/VhqL 25TTzekIK3SJ2WgTNgtzdAEqZi3a7rkjk22greMeuQecEgK5qoo4DQZfiE3w2KXZp0rg +LubvoHJ58t/2SN9a1LUmwvhtqjN5RYzZWGifazXp2kSTwy/T1vweIA+apcmY14IJZAQ wa/Q== MIME-Version: 1.0 Received: by 10.68.202.130 with SMTP id ki2mr14041974pbc.52.1335891129315; Tue, 01 May 2012 09:52:09 -0700 (PDT) Sender: ekneuss@gmail.com Received: by 10.68.72.6 with HTTP; Tue, 1 May 2012 09:52:09 -0700 (PDT) In-Reply-To: References: Date: Tue, 1 May 2012 18:52:09 +0200 X-Google-Sender-Auth: EPdb3mRC4_dVWjU6OloHPMq2oUE Message-ID: To: Ferenc Kovacs Cc: Nikita Popov , Patrick ALLAERT , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Allow non-variable arguments to empty() and isset() From: colder@php.net (Etienne Kneuss) Hi, On Tue, May 1, 2012 at 18:43, Ferenc Kovacs wrote: > > albeit I'm not laruence, but I also supported the idea to keep consistency > across the allowed params of empty and isset. > here is my reasoning: > - both isset and empty are language constructs, which many people use > almost interchangeability, changing one of them in a way that the same > expression works with one of them, but blows up with a parse error seems > wrong to me. > - maybe you think that isset doesn't really make sense with expressions, > but don't forget that this patch would also allow constants to be used with > empty/isset, and imo isset(some_constant); would be useful and maybe more > straightforward for the people new to the language. So isset(UNDEFINEDCONSTANT) will be isset("UNDEFINEDCONSTANT") which will/should 1) yield a notice, which is unnexpected for isset 2) return true, which is also unexpected. I don't see much point in that. Best regards, -- Etienne Kneuss http://www.colder.ch