Re: [PHP-DEV] wrong implementation of isset()?

2001-02-07 Thread Andi Gutmans
At 03:02 AM 2/7/2001 +0100, Cynic wrote: with all respect to the people who develop the language, I think this is nonsense: $rs = mysql_query( 'select x, y, z from foo where ...' ) ; $x = mysql_fetch_array( $rs , MYSQL_NUM ) ; var_dump( $x[2] ) ; var_dump( isset( $x[2] ) ) ; NULL # well, the

[PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread Martin Jansen
The following was reported today in the german language newsgroup news:de.comp.lang.php: ?php $a = NULL; if (isset($a)) { print "ok, du hast recht"; } ? Shouldn't this script generate some output? IMO $a is set and isset() should return true. The manual says: "isset -- Determine whether a

Re: [PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread Andrei Zmievski
On Tue, 06 Feb 2001, Martin Jansen wrote: The following was reported today in the german language newsgroup news:de.comp.lang.php: ?php $a = NULL; if (isset($a)) { print "ok, du hast recht"; } ? Shouldn't this script generate some output? IMO $a is set and isset() should return true.

Re: [PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread Bjoern Hoehrmann
* Andrei Zmievski wrote: ?php $a = NULL; if (isset($a)) { print "ok, du hast recht"; } ? Shouldn't this script generate some output? IMO $a is set and isset() should return true. NULL == not set Great analysis. What about answering the question? Stanislav Malyshev said some months ago

Re: [PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread Andrei Zmievski
On Tue, 06 Feb 2001, Bjoern Hoehrmann wrote: NULL == not set Great analysis. What about answering the question? Stanislav Malyshev said some months ago this is 'strange', see the discussion around bug 6076. Tell us at least, why this actually isn't strange. By default, any unset variable

Re: [PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread Martin Jansen
On Tue, 6 Feb 2001 13:43:29 -0600, Andrei Zmievski wrote: On Tue, 06 Feb 2001, Bjoern Hoehrmann wrote: NULL == not set Great analysis. What about answering the question? Stanislav Malyshev said some months ago this is 'strange', see the discussion around bug 6076. Tell us at least, why this

RE: [PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread Chris Newbill
these by. Chris -Original Message- From: Martin Jansen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 06, 2001 2:19 PM To: Andrei Zmievski; Bjoern Hoehrmann Cc: PHP Development Mailing List Subject: Re: [PHP-DEV] wrong implementation of isset()? On Tue, 6 Feb 2001 13:43:29 -0600, Andrei Zmievski

Re: [PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread Ron Chmara
"Mark J. Hershenson" wrote: Great analysis. What about answering the question? Stanislav Malyshev said some months ago this is 'strange', see the discussion around bug 6076. Tell us at least, why this actually isn't strange. By default, any unset variable has value NULL - and isset(NULL)

Re: [PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread John Donagher
On Wed, 7 Feb 2001, [ISO-8859-1] André Langhorst wrote: we should just define (and document) this similar to Andrei (note, I do not use the word "the same" I use that word equal, what means different things): NULL equals absence_of_value equals absence_of_variable_in_namespace I

Re: [PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread Ron Chmara
Andr Langhorst wrote: Perhaps, in order to maintain compatibility, we should re-document is_set, create the documentation for is_null, and look into creating a new function that will determine if something has "ever been inside the namespace", regardless of its current value, or absence