|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-05-21 17:53 UTC] me at rouvenwessling dot de
Description:
------------
Apparently the offset in strrpos doesn't work right if it's the same as the needle
length.
Test script:
---------------
$result = strrpos('Internationalization', 'n', -1);
var_dump($result);
Expected result:
----------------
int(10)
Actual result:
--------------
int(19)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 22:00:01 2025 UTC |
I dont think it's a bug 'Internationalization' , then -1 , the cursor is at 'Internationalization', exactlly point to the 'n' ^ so, no matter what direction it try to find in, the "n" should be returned