|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-25 11:00 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Jan 04 02:00:01 2026 UTC |
Description: ------------ When using strpos inside a foreach and the needle is the key of the array being looped over one get strange return values. Not all key and not all length of the haystack produces this result, and not all needle/haystacks produce the same faulty return value Reproduce code: --------------- $maps = array('919400' => 'foo'); foreach ($maps as $orgnr => $foo) var_dump(strpos('ou=000000,ou=000000,ou=000000,ou=0000000000,ou=organization,dc=chalmers,dc=se', $orgnr)); Expected result: ---------------- bool(false) Actual result: -------------- int(64)