From:             flood87 at hot dot ee
Operating system: Windows XP
PHP version:      5.0.0b1 (beta1)
PHP Bug Type:     Unknown/Other Function
Bug description:  Number 0 is equal to any string.

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 bug report at http://bugs.php.net/?id=26071&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26071&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26071&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26071&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26071&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26071&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26071&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26071&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26071&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26071&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26071&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26071&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26071&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26071&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26071&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26071&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26071&r=float

Reply via email to