Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60400 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99270 invoked from network); 1 May 2012 17:24:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 May 2012 17:24:11 -0000 Authentication-Results: pb1.pair.com header.from=patrick.allaert@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=patrick.allaert@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: patrick.allaert@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:50850] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/F9-38165-93C10AF4 for ; Tue, 01 May 2012 13:24:10 -0400 Received: by ghbg2 with SMTP id g2so2318440ghb.29 for ; Tue, 01 May 2012 10:24:06 -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=hoU1aRhh9te2jlakkxpbOsRPKa+1sHtZFx7cnwRJ47Q=; b=ki+oX7VKoWSUzUhXfUukR/fZVQK5yG+2Kp/RiZGWnI04kRRyq/tMFPc8SQTd3QbVD4 eTLnYiR7tlVYcaQQaBc3aSHlwnzj+o6e3cTtAv+N1ATJtsqKYkgo+pBk5BhYeMMrIhfQ 1OL+ntfITYOc204ldVq22/iiE3M87GIrqyyXVbAMLNG+kjLyH1AwmcTJtR3WezIClq4E eO5GuqPdl7pxS9YeRD10OnaBrNZw1MxnpULxL2ZDI1i5DG71ygGIjqumXhCUnRu7fMkx y9XhK+1RM42Nu2SpEBNchx7bjDym/iltX8ob2dhg35f+cTBScMopFG9VgfiSKp0fE/cR 14hw== MIME-Version: 1.0 Received: by 10.68.134.72 with SMTP id pi8mr53537635pbb.18.1335893045926; Tue, 01 May 2012 10:24:05 -0700 (PDT) Sender: patrick.allaert@gmail.com Received: by 10.68.50.104 with HTTP; Tue, 1 May 2012 10:24:05 -0700 (PDT) In-Reply-To: References: Date: Tue, 1 May 2012 19:24:05 +0200 X-Google-Sender-Auth: tV5_JP-XuOpFyuC4GQ1VwFXaNtk Message-ID: To: Ferenc Kovacs Cc: Nikita Popov , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Allow non-variable arguments to empty() and isset() From: patrickallaert@php.net (Patrick ALLAERT) 2012/5/1 Ferenc Kovacs : > On Mon, Apr 30, 2012 at 2:39 PM, Nikita Popov wrote: > - 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. I wish that more wrong usages could blow up with parse errors way before waiting for the incorrect line to be run. While there is some valid use cases for empty() I see none for isset(), it must remain a targeted and specific construct IMHO. > - maybe you think that isset doesn't really make sense with expressions, exact :) > but don't forget that this patch would also allow constants to be used with > empty/isset. That is not a very good think IMO. For the same reason: this patch would also allow writing: empty( false ) or empty( null ) which are both clueless. The fact that this patch would now allow syntactically doubtful things doesn't mean they should be encouraged nor propagated to isset(). Cheers, Patrick