Bug #14287: array_diff takes string as second argument
| From: | stefan dot priebsch at e-novative dot de | Date: | Thu, 29 Nov 2001 17:39:47 +0000 |
| Subject: | Bug #14287: array_diff takes string as second argument | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-72048@lists.php.net to get a copy of this message | ||
From: stefan.priebsch@e-novative.de
Operating system: W2K
PHP version: 4.0.6
PHP Bug Type: Scripting Engine problem
Bug description: array_diff takes string as second argument
Seems like array_diff will take a string as second argument, e.g.
array_diff ($bla, "fred")
where $bla is an array. No error or warning will appear, and array_diff
will not work as expected (which would be removing "fred" from $bla).
Of course everything works fine using
array_diff ($bla, array ("fred"))
However, for the above case imho there should either be a compiler warning
or a note added to the manual.
Steve
--
Edit bug report at: http://bugs.php.net/?id=14287&edit=1