ID:               16955
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Red Hat 6.2
 PHP Version:      4.2.0
 New Comment:

Already exists, try if (NULL !== 0) { ... } else { ... }

bogussing.

Derick


Previous Comments:
------------------------------------------------------------------------

[2002-05-01 19:14:40] [EMAIL PROTECTED]

I find the problem:

$temp = "0"; // is not // $temp = 0;

Sorry :)

However, I'd like to have 0 <> NULL in the future :) Don't you think?

------------------------------------------------------------------------

[2002-05-01 17:20:37] [EMAIL PROTECTED]

Hello!
i might have found a problem dealing with 0 and NULL values while using
a recursive function in a class that i have created.

I have found some bugs related to this problem in the php-bugs database
about "0" and "NULL", but the problem i have found goes more into
depth: i've noticed that 0 == NULL only if the value "0" only if the
value "0" comes from the array passed to the recurvise function. i try
to explain with an example:

$temp = $a[$p];

if ($temp == "") {
 if ($temp == "0") {
  echo ("impossible");
 }
}

it happens that the output will be "impossible".

instead, if i set $temp = "0" or NULL before the IF structures, i won't
get the output "impossible":

$temp = $a[$p];

$temp = "0";
   // or  $temp = NULL;
   // or without declaring at all the variable $temp

if ($temp == "") {
 if ($temp == "0") {
  echo ("Impossible");
 }
}



$a is an array which can be modified or not by the recursive function,
and is then passed as a parameter to the function itself

I have tested it both with version 4.0.5 and 4.2.0

If you would like to receive more details about this, i will be glad to
send you the complete source code. i have tried to reduce the lenght of
the code, anyway it's still too long to write here. if you are
interested, i could send you all the code by email or i could give you
an account to access my server and work by ftp/http

best regards,
and thank you for developing PHP :)
Claudo Frizziero

---

configure line:

configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs
--with-jpeg-dir=/usr/local/bin --with-gd=/usr/ --enable-ftp


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16955&edit=1

Reply via email to