Re: Bug #13126 Updated: in_array() is type-strict by default?

From: Date: Thu, 06 Sep 2001 08:15:04 +0000
Subject: Re: Bug #13126 Updated: in_array() is type-strict by default?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65223@lists.php.net to get a copy of this message

A test of this failed with v.4.0.6. What can I say? You dont seem to need
this kind of input, do you? I'm not trying to bring you down, just trying to
point to a potential problem. Anyway, this function acts differently with
v4.0.6 than 4.0.3. And I can't see a change reported on it.

Sorry for the inconvenience. Good luck making a programming language.

    Eivind


----- Original Message -----
From: "Bug Database" <php-dev@lists.php.net>
To: <esivertsen@atmel.com>
Sent: Wednesday, September 05, 2001 12:45 AM
Subject: Bug #13126 Updated: in_array() is type-strict by default?


> ID: 13126
> Updated by: sniper
> Reported By: esivertsen@atmel.com
> Old Status: Open
> Status: Bogus
> Bug Type: Arrays related
> Operating System: FreeBSD
> PHP Version: 4.0.6
> New Comment:
>
> RTFM:
>
> bool in_array (mixed needle, array haystack [, bool strict])
>
> --Jani
>
>
> Previous Comments:
> ------------------------------------------------------------------------
>
> [2001-09-04 07:18:54] esivertsen@atmel.com
>
> It seems like the in_array() function has been slightly altered in this
(4.0.6) release compared to 4.0.3.
>
> A check of an array of chars against integers fail; but it didn't in
verison 4.0.3.
>
> example:
>
> $char_array = array("1","2","3");
>
> if(in_array($char_array, 2))
>    $output = "FOUND";
> else
>    $output = "NOT FOUND";
>
> echo $output;
>
>
> ----> produces the output "NOT FOUND";
>
> Seems some typecasting is necessary this time...
>
>
>
>
> ------------------------------------------------------------------------
>
>
>
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at
http://bugs.php.net/?id=13126&edit=2
>
>



Thread (4 messages)

« previous php.dev (#65223) next »