For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > May 2005 > #33189 [Opn]: error in definition of strripos









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #33189 [Opn]: error in definition of strripos
aidan@php.net

2005-05-30, 8:56 pm

ID: 33189
Updated by: aidan@php.net
Reported By: alex at idoia dot com
Status: Open
Bug Type: Documentation problem
Operating System: debian linux
PHP Version: Irrelevant
New Comment:

Hi Alex,

Actually that's not quite correct either.

Negative offset values mean the end of string is moved to the left by
the magnitude of the specified value plus one.

E.g. strripos('abcdef', 'b', -4) will search the string 'abc' for 'b'.

I've updated the manual to be a little more explicit.


Previous Comments:
------------------------------------------------------------------------

[2005-05-30 19:51:36] alex at idoia dot com

Description:
------------
the description says:
"offset may be specified to begin searching an arbitrary
number of characters into the string. Negative values
will stop searching at an arbitrary point prior to the
end of the string."

And I think the right definition is:
offset may be specified to begin searching an arbitrary
number of characters into the string. Negative values
will START searching at an arbitrary point prior to the
end of the string.



------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=33189&edit=1
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com