Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6132 invoked from network); 10 Apr 2012 23:37:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Apr 2012 23:37:53 -0000 Authentication-Results: pb1.pair.com header.from=jelle.zijlstra@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jelle.zijlstra@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: jelle.zijlstra@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-wg0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:41630] helo=mail-wg0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/54-18401-054C48F4 for ; Tue, 10 Apr 2012 19:37:53 -0400 Received: by wgbdq13 with SMTP id dq13so275762wgb.11 for ; Tue, 10 Apr 2012 16:37:50 -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:cc :content-type; bh=vBCfpoRxSYGBm02qj9Pm4lXVhCNw9CKDO9SccZLZqmQ=; b=pEQMpmCx+5bTZsifE71FudQ9vW5bd+qCHbXPSGC5Fnl2ZmvCXX/q84EDo/P/9EVdmm 8ulyt0Fjw8bDF209Yz16dIROvpYG/aFv0GYvefYwOYq1JwHN/fjxVlFA2/4FlgTt2o9A 6hXiqWds7mZkPkWplNmF0K81t0LXzZiwD5hlKJhuKN/AeCm4Kkb37zRk28NDqeb9Rlz/ VEdF0D+L0O6zne0LY/mbf/PBCbmGn6+rg0V0yE1DYWMUbT+PWpQ7uH8sPY0xczOomj2h PWoXOPdAGRcxxw0fBU1b5rORhEVe9bh/tTGYnW4H2yv6j5WFScxddE73Kh12V9Nfm0UG PQdQ== MIME-Version: 1.0 Received: by 10.216.133.39 with SMTP id p39mr7181074wei.40.1334101069949; Tue, 10 Apr 2012 16:37:49 -0700 (PDT) Received: by 10.216.26.67 with HTTP; Tue, 10 Apr 2012 16:37:49 -0700 (PDT) In-Reply-To: <1334100700.4609.79.camel@guybrush> References: <1334100700.4609.79.camel@guybrush> Date: Tue, 10 Apr 2012 19:37:49 -0400 Message-ID: Cc: PHP internals Content-Type: multipart/alternative; boundary=0016e6ddfefb5e6a7e04bd5b9cb9 Subject: Re: [PHP-DEV] Allow non-variable arguments to empty() From: jelle.zijlstra@gmail.com (Jelle Zijlstra) --0016e6ddfefb5e6a7e04bd5b9cb9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2012/4/10 Johannes Schl=FCter > On Tue, 2012-04-10 at 19:12 -0400, Jelle Zijlstra wrote: > > I think this is a useful simplification of the language, removing an > > unnecessary exception. Would it also make sense to make empty() into a > > library function instead of a language construct? That would not > > result in > > any BC break as far as I can see, but would allow some things that are > > currently impossible (e.g., a method called "empty") and further > > simplify > > the language. > > It would, as an empty function would spit notices if the variable > doesn't exist (or would have to use references, which would create the > variable if it didn't exist already) and therefore destroy the primary > use of that construct ... oh and such an empty won't be different from a > simple "if" or bool cast. > > johannes > > You are quite right; I'm sorry for forgetting about that. --0016e6ddfefb5e6a7e04bd5b9cb9--