|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-10-09 16:33 UTC] scottmac@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jan 13 09:00:01 2026 UTC |
Description: ------------ if ( in_array( "1a", array(1) ) ) { echo "ok"; } returns ok I know that it returns true if i compare "1" with 1 (string with int) and that there is a third parameter to avoid this. Bot imho "1a" and 1 are completly different and should even without type compare return false I tried this on a unix system with 5.2.0 and just to check if it was fixed in the current version with 5.2.4 at a win system Reproduce code: --------------- just execute if ( in_array( "1a", array(1) ) ) { echo "ok"; } Expected result: ---------------- No Output Actual result: -------------- script echoed "ok"