From:             wishm at bk dot ru
Operating system: win32
PHP version:      4.4.4
PHP Bug Type:     Arrays related
Bug description:  array_diff "compare with 2" bug

Description:
------------
array_diff() function fails on comparing any array element with 2, when
another pair of elements are both set to 2. Fails with that settings only.

Reproduce code:
---------------
<?php
$a = array("2","2");
$b = array("2","any_symbols_here");
// same thing on $b = array("any_symbols_here","2");
print_r(array_diff($a,$b));
?>

Expected result:
----------------
Array ( [1] => 2 ) 

// second elements are not equal so function should return that element
from $a array

Actual result:
--------------
Array ( )

//empty array - function failed

-- 
Edit bug report at http://bugs.php.net/?id=39811&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39811&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39811&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39811&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39811&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39811&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39811&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39811&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39811&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39811&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39811&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39811&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39811&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39811&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39811&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39811&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39811&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39811&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39811&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39811&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39811&r=mysqlcfg

Reply via email to