Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22820 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80155 invoked by uid 1010); 17 Apr 2006 17:46:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80140 invoked from network); 17 Apr 2006 17:46:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2006 17:46:42 -0000 X-Host-Fingerprint: 66.249.82.196 xproxy.gmail.com Linux 2.4/2.6 Received: from ([66.249.82.196:44245] helo=xproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 79/71-19715-184D3444 for ; Mon, 17 Apr 2006 13:46:41 -0400 Received: by xproxy.gmail.com with SMTP id t14so459493wxc for ; Mon, 17 Apr 2006 10:46:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=AFVKWI2EpH5i51wL9WWyTjCe3O+U8R8/ZuhOUQDsXKX5BFDF1kGykUlpHnxqOX7yLeBkv8+MTQ3x5nTU8PoykNj8nKk4rGjnzAh/OV1xgXd9RFA2DLk1mGf/SJ+dXDehrd83OmlvhtnK4L43Z/3iWetkzqGKNpEcowQ4or8ex10= Received: by 10.70.35.17 with SMTP id i17mr931136wxi; Mon, 17 Apr 2006 10:46:37 -0700 (PDT) Received: by 10.70.12.3 with HTTP; Mon, 17 Apr 2006 10:46:37 -0700 (PDT) Message-ID: <2e24b1e00604171046k2665724bv4059158b99d6d82d@mail.gmail.com> Date: Mon, 17 Apr 2006 13:46:37 -0400 To: internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_18700_3250961.1145295997942" References: <2e24b1e00604150752g69acab4er1058771d9e60a352@mail.gmail.com> <4442CB1E.7050508@php.net> <4442DAD8.1090607@dealnews.com> <3516.209.254.223.2.1145240948.squirrel@www.l-i-e.com> Subject: Re: [PHP-DEV] Inconsistency of empty() and isset() ? From: itrebal@gmail.com ------=_Part_18700_3250961.1145295997942 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Should I go ahead and submit this patch? Where should I go about doing so? = I looked around bugs.php.net but am unsure. On 4/17/06, Ron Korving wrote: > > isset() does more than check the existance in a hash table, because this > the > following is true: > > $foo =3D null; > isset($foo); // returns false, even though $foo is initialized > echo $foo; // will not cause a NOTICE, because $foo is initialized > > - Ron > > > ""Richard Lynch"" wrote in message > news:3516.209.254.223.2.1145240948.squirrel@www.l-i-e.com... > > On Sun, April 16, 2006 7:38 pm, Pierre wrote: > > > isset and empty share the same implementation, the only difference is > > > what they return (in short). They behave "the same", they should > > > continue do so if empty accept many arguments. > > > > Actually... > > > > Unless the docs are lying to me... > > > > empty() checks the contents of the value, and does something quite > > different based on the value found. > > > > isset() just plain checks in the hash table[s] if the variable has > > been assigned, and that's it. > > > > Plus, the meaning of empty() changed in some a way with "0" between > > versions 3 and 4, and then again with respect to objects with no > > properties between 4 and 5. > > > > isset() has never changed its meaning out from under me. :-) > > > > So, while the guts of the function may be the same in source, there's > > got to be some kind of flag or something going on for empty() to be > > checking all those values, no??? > > > > -- > > Like Music? > > http://l-i-e.com/artists.htm > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- ------------------------------------ Graham Christensen www.itrebal.com www.iamgraham.net ------=_Part_18700_3250961.1145295997942--