|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-27 11:19 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 18:00:02 2026 UTC |
Description: ------------ Searching for a string in an integer using strpos() returns integer 0 if (integer % 256) is the lowest ASCII value of any character in the search string, or the highest ASCII value of any character minus 256. Otherwise it returns boolean false as expected. Reproduce code: --------------- var_dump(strpos("A", 65)); var_dump(strpos("A", 66)); var_dump(strpos("B", 65)); var_dump(strpos("B", 66)); Expected result: ---------------- bool(false) bool(false) bool(false) bool(false) Actual result: -------------- int(0) bool(false) bool(false) int(0)