Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3959 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49970 invoked from network); 14 Aug 2003 19:45:07 -0000 Received: from unknown (HELO asuka.nerv) (24.112.18.98) by pb1.pair.com with SMTP; 14 Aug 2003 19:45:07 -0000 Received: (qmail 17243 invoked from network); 14 Aug 2003 19:58:41 -0000 Received: from rei.nerv (HELO dummy.com) (rei@192.168.1.1) by asuka.nerv with SMTP; 14 Aug 2003 19:58:41 -0000 Reply-To: ilia@prohost.org Organization: Prohost.org To: Robert Cummings , walt boring , Timm Friebe , internals@lists.php.net Date: Thu, 14 Aug 2003 15:59:05 -0400 User-Agent: KMail/1.5.3 References: <1060813541.901.336.camel@ali> <200308141530.20653.ilia@prohost.org> <1060889615.29961.11.camel@blobule.suds> In-Reply-To: <1060889615.29961.11.camel@blobule.suds> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200308141559.05609.ilia@prohost.org> Subject: Re: [PHP-DEV] Re: variable_exists() patch From: ilia@prohost.org (Ilia Alshanetsky) On August 14, 2003 03:33 pm, Robert Cummings wrote: > Actually isset() doesn't behave as it should: > > $foo = null; > echo isset( $foo ); Not quite. To understand the nature of NULL you must consider the following. Suppose you have a variable $foo you wish to 'destroy' you can do so by doing unset($foo) or $foo = NULL;. In both cases the value of $foo will be destroyed, however the variable will remain, it's value will become NULL. Therefor isset() behaviour, which works by seeing if a variable exists and making sure that its value is not null, is correct and now flawed as you claim. This is true for other languages as well such as C, when a pointer's value is null that pointer is 'no set'. Ilia