ID:               25129
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tech at mediaforest dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Linux
 PHP Version:      Irrelevant
 New Comment:

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

>From the manual:
array_diff() returns an array containing all the values of array1  that
are not present in any of the other arguments.


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

[2003-08-18 09:42:10] tech at mediaforest dot net

Description:
------------
As this script shows, the array_diff function doesn't give the expected
result on a php4.2.3 :



Reproduce code:
---------------
<?
$today_list = array("pic_0710.jpg","pic_0740.jpg");
$yesterday_list = array("pic_0710.jpg","pic_0740.jpg","pic_0910.jpg");
$result = array_diff($today_list,$yesterday_list);

var_dump($result);

?>

Expected result:
----------------
array(1) { [0]=>  string(12) "pic_0910.jpg" }

Actual result:
--------------
array(0) { }


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


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

Reply via email to