Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22822 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5146 invoked by uid 1010); 18 Apr 2006 00:26:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5131 invoked from network); 18 Apr 2006 00:26:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2006 00:26:51 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:8580] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 06/71-19715-94234444 for ; Mon, 17 Apr 2006 20:26:50 -0400 Received: (qmail 27088 invoked from network); 18 Apr 2006 00:26:46 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 18 Apr 2006 00:26:46 -0000 Message-ID: <7.0.1.0.2.20060417172622.04926da0@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Mon, 17 Apr 2006 17:26:42 -0700 To: itrebal@gmail.com,internals@lists.php.net In-Reply-To: <2e24b1e00604171046k2665724bv4059158b99d6d82d@mail.gmail.co m> 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> <2e24b1e00604171046k2665724bv4059158b99d6d82d@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Inconsistency of empty() and isset() ? From: andi@zend.com (Andi Gutmans) Nope you shouldn't, as per my previous email. At 10:46 AM 4/17/2006, itrebal@gmail.com wrote: >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 = 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