ID: 23076
Comment by: benoit dot ferlet at freesbee dot fr
Reported By: colin at omenmedia dot com
Status: Bogus
Bug Type: Arrays related
Operating System: Windows 2000
PHP Version: 4.3.1
New Comment:
I've the same Bug in the 4.3.4 php version !
when I use in_array(Object,Array) I've the wrong data type error !
Previous Comments:
------------------------------------------------------------------------
[2003-04-06 21:19:05] [EMAIL PROTECTED]
Dupe of bug #20681
------------------------------------------------------------------------
[2003-04-06 21:06:51] colin at omenmedia dot com
PHP is reporting a "Wrong datatype for first argument" error when using
an object as the needle argument for the in_array() function. The code
below will generate the error:
<?php
class Foo
{
}
$foo = new Foo();
$test = array(1,2,3,4,5);
if (in_array($foo,$test))
{
print "Yes";
}
else
{
print "No";
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23076&edit=1