Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60418 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73832 invoked from network); 2 May 2012 09:43:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 May 2012 09:43:06 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@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: pierre.php@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:59135] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/75-38165-AA101AF4 for ; Wed, 02 May 2012 05:43:06 -0400 Received: by ghbg2 with SMTP id g2so508871ghb.29 for ; Wed, 02 May 2012 02:43:03 -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:content-transfer-encoding; bh=NpoB2HPi98kBpZMUrKfj3RGXumFgA4mVWONg8/Q7NlE=; b=mzfTedONt4NR1hGHQp+hF2SQG/rpT8gZjG9T2L/BXK3ylx22VCHL+jCOKh5LpZzD1o HTVOq/tYIPB44p6nimjM1VvfCHOrPgU9VDFPBhpDijMDQYIq4zR7d+/iaMw0Ysu2cgwR E5IrgV7vO9LGrdBDzj7h3iGUK9mJQyxTHa71BVDjiWOlV+pqkhWiV1oj3fga36nG9HKZ +S135yHFjIskbqxuoHOil94vk8CLWbpjolR78N9zcEfJ2tChFWWu73xIR6gIkEZtGNCx 9+3U0mYwhpcc2xhnSo9imytwV6kCEkdijWYiA6C34OjglueTRD7RpJMptyhFmjuL2/OA D4aA== MIME-Version: 1.0 Received: by 10.236.125.234 with SMTP id z70mr30026039yhh.18.1335951783337; Wed, 02 May 2012 02:43:03 -0700 (PDT) Received: by 10.147.32.16 with HTTP; Wed, 2 May 2012 02:43:03 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 May 2012 11:43:03 +0200 Message-ID: To: Ferenc Kovacs Cc: Laruence , Patrick ALLAERT , Nikita Popov , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Allow non-variable arguments to empty() and isset() From: pierre.php@gmail.com (Pierre Joye) hi, On Wed, May 2, 2012 at 11:36 AM, Ferenc Kovacs wrote: > $foo=3Dnull; > var_dump(isset($foo)); //prints=A0bool(false) No offset meant, but it is totally expected and well known, and as far as I remember documented too. Assigning NULL to a variable unsets it (so to say). >> empty() on the other hand, tests if something is empty, and only if it >> is empty. The result of an expression can be empty. >> > > an expression can also have a value of null. And NULL is empty. No issue here. Cheers, --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org