From: arjen at react dot nl
Operating system: Linux
PHP version: 5.2.3
PHP Bug Type: mbstring related
Bug description: Negative offset for mb_strrpos not working
Description:
------------
>From the manual:
Note: As of PHP 5.2.0 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.
Negative offsets are not working.
Reproduce code:
---------------
var_dump(mb_strrpos('abcd', 'd', -2));
var_dump(mb_strrpos('abcdd', 'd', -2));
Expected result:
----------------
boolean false
int 3
Actual result:
--------------
int 3
int 4
--
Edit bug report at http://bugs.php.net/?id=42085&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=42085&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=42085&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=42085&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42085&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=42085&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42085&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42085&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42085&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42085&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42085&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=42085&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=42085&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42085&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42085&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42085&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42085&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42085&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42085&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42085&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42085&r=mysqlcfg