|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-23 09:44 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 11 15:00:01 2026 UTC |
i think that this is not properly a bug, but an good sugestion... the returned values of the strpos and strrpos functions are NULL for non-matching, ZERO when the match ocurred at the first position of the string, ONE when the match ocurred at the second position, and so on. on the following sample, if $gbProcessStatus matches de "A" on the first string, the code within the if will not get run... ... if ( strpos ( "AC", $gbProcessStatus ) ) ) { // do something } ... at my view point, a nice value returned from these functions would be ZERO or NULL for non-matching, ONE for the first match, and so on... hope this was an useful note, Sidney Amaral