From:             [EMAIL PROTECTED]
Operating system: Linux Red hat 7.1 fr
PHP version:      4.0.6
PHP Bug Type:     Arrays related
Bug description:  array_diff don't work with array of array (it did with 4.0.4)

Example of script
echo "<html><body>\r\n";
echo "<h1>Simple array : it works</h1>\r\n<pre>\r\n";
$array1 = array('a1' => 'toto', 'b1' => 'titi', 'b2' => 'tutu', 'b3' =>
'rien', 'c1' => 'zone');
$array2 = array('a2' => 'adeux', 'b5' => 'titi');
var_dump(array_diff($array1, $array2));

echo "\r\n</pre>\r\n<hr>\r\n<h1>Array of array : it doesn't
$array1 = array(
   array('a1' => 'toto', 'b1' => 'titi', 'b2' => 'tutu', 'b3' => 'rien',
'c1' => 'zone'),
   array('a2' => 'adeux', 'b5' => 'titi'), 
   array('a8' => 'ahuit', 'b12' => 'avion')
$array2 = array(
   array('a2' => 'adeux', 'b5' => 'titi'),
   array('a7' => 'asept', 'c5' => 'camion')
var_dump(array_diff($array1, $array2));
echo "\r\n</pre></body></html>\r\n";

Command line
 './configure' '--with-apache=../apache' '--with-zlib' '--with-bzip2'
'--enable-calendar' '--with-cybermut=../cybermut' '--enable-ftp'
'--with-gd=../gd' '--with-pgsql=/usr/local/psql' '--with-mysql'
'--with-sablot' '--with-xml'

I use array_diff with array of array comming from database since version
4.0.1 without any trouble. We just migrate to version 4.0.6 tree days ago
with apache 1.3.20.

Congratulation for PHP. I love it :o)

Edit bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to