ID:               26071
 User updated by:  flood87 at hot dot ee
 Reported By:      flood87 at hot dot ee
 Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Windows XP
 PHP Version:      5.0.0b1 (beta1)
 New Comment:

Oh, sorry. I did look through the documentation, but didn't find the
needed page. For those, who have the same problem, the needed page is
http://www.php.net/manual/en/types.comparisons.php .

Thank you.


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

[2003-11-01 15:17:04] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Use ===

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

[2003-11-01 15:10:52] flood87 at hot dot ee

Description:
------------
The bug takes place in versions of php from 4 to 5. Because of some
reasons number 0 is equated with any string. The equal operator (==) is
used. The problem is well illustrated with the "Reproduce code".

Reproduce code:
---------------
$i = 0;
$b = $i == "str";
var_dump($b);

Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)


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


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

Reply via email to