note 130003 added to function.strrpos
| From: | xaiomimidron@gmail.com | Date: | Fri, 31 Jan 2025 07:03:53 +0000 |
| Subject: | note 130003 added to function.strrpos | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221821@lists.php.net to get a copy of this message | ||
Im quite dissapointed that the PHP team havent corrected the confusing text about using zero or
positive offset in this function.
The manual says, that the search are then "performed from left to right" (starting from
the given offset position into the string ofc).
What does it mean with "..left to right.." (->) when everyone are thinking about a
search going backwards from the end of the string ?
The function works ok and find the "last" occurence, but Its a little annoying considering
people who are busy must read through the examples - or even test themselves to discover that the
text was a confusion.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 147.78.31.69)
----
Manual Page -- https://php.net/manual/en/function.strrpos.php
Edit -- https://main.php.net/note/edit/130003
Del: integrated -- https://main.php.net/note/delete/130003/integrated
Del: useless -- https://main.php.net/note/delete/130003/useless
Del: bad code -- https://main.php.net/note/delete/130003/bad+code
Del: spam -- https://main.php.net/note/delete/130003/spam
Del: non-english -- https://main.php.net/note/delete/130003/non-english
Del: in docs -- https://main.php.net/note/delete/130003/in+docs
Del: other reasons-- https://main.php.net/note/delete/130003
Reject -- https://main.php.net/note/reject/130003
Search -- https://main.php.net/manage/user-notes.php