PHP 4.0 Bug #9458: in_array() error
| From: | tf at tfromm dot com | Date: | Mon, 26 Feb 2001 12:42:17 +0000 |
| Subject: | PHP 4.0 Bug #9458: in_array() error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47548@lists.php.net to get a copy of this message | ||
From: tf@tfromm.com
Operating system: linux 2.2.x 2.4.x
PHP version: 4.0.3pl1
PHP Bug Type: Arrays related
Bug description: in_array() error
comparison problem in in_array() function
<?php
$a="foo";
$b=array(1, 4, 6);
if(in_array($a, $b)){
echo "BAR!";
}
?>
is a little bit confusing, espacially for user, who comes from other programming languages ...
(seems not to be a feature ;-)
--
Edit Bug report at: http://bugs.php.net/?id=9458&edit=1