ID: 43800 Updated by: [EMAIL PROTECTED] Reported By: subson at gmail dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows XP PHP Version: 5.2.5 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2008-01-09 17:19:04] subson at gmail dot com Description: ------------ This is the existing code i Found in php.net manual, It has 3 parameters, what is the purpose of 3rd parameter. If it is going to check from 3rd array also any intersecting elements. I tried code below with 3 arrays but it displayed me empty array. Working Code from PHP manual: ******************************************************************* array array_diff ( array array1, array array2 [, array ...] ) array_diff() returns an array containing all the values of array1 that are not present in any of the other arguments. Note that keys are preserved. Example 1. array_diff() example <?php $array1 = array("a" => "green", "red", "blue", "red"); $array2 = array("b" => "green", "yellow", "red"); $result = array_diff($array1, $array2); print_r($result); ?> Multiple occurrences in $array1 are all treated the same way. This will output : Array ( [1] => blue ) ********************************************************************** ********************************************************************** Reproduce code: --------------- Code i Tried: ********************************************************************** <?php $array1 = array("a" => "green", "red", "blue","white"); $array2 = array("b" => "green", "yellow", "red"); //$array3 = array("white"); $array3 = array(); $result = array_intersect($array1, $array2,$array3); print_r($result); ?> // Output Array ( ) an empty Array ********************************************************************** Expected result: ---------------- it should check in the 3rd array also for any intersecting elements and then it should display the elements from array1 which are intersecting with either 2nd or 3rd array. Actual result: -------------- An empty Array ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43800&edit=1