#42085 [Opn->Asn]: mb_strrpos() inconsistent with strrpos() with negative offset

From: Date: Fri, 17 Aug 2007 13:48:35 +0000
Subject: #42085 [Opn->Asn]: mb_strrpos() inconsistent with strrpos() with negative offset
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-116243@lists.php.net to get a copy of this message
ID: 42085 Updated by: jani@php.net Reported By: arjen at react dot nl -Status: Open +Status: Assigned Bug Type: mbstring related Operating System: Linux PHP Version: 5.2.3 -Assigned To: +Assigned To: hirokawa New Comment: Assigned to the maintainer of mbstring extension. Previous Comments: ------------------------------------------------------------------------ [2007-07-24 10:53:10] arjen at react dot nl 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 this bug report at http://bugs.php.net/?id=42085&edit=1

« previous php.bugs (#116243) next »