note 95965 added to function.substr
| From: | Keita at osu1 dot php dot net | Date: | Mon, 01 Feb 2010 00:51:12 +0000 |
| Subject: | note 95965 added to function.substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165535@lists.php.net to get a copy of this message | ||
@viktor:
$string = removeFromEnd($string, '.jpg');
has the same effect like
$string = removeFromEnd($string, 'abcd');
or calling the function with any other 4 byte long string as second argument - it simply truncates
regardless of the content of the second argument, because you don't check the occurence of the
second argument within $string.
----
Server IP: 69.147.83.197
Probable Submitter: 87.156.255.109
----
Manual Page -- http://www.php.net/manual/en/function.substr.php
Edit -- https://master.php.net/note/edit/95965
Del: integrated -- https://master.php.net/note/delete/95965/integrated
Del: useless -- https://master.php.net/note/delete/95965/useless
Del: bad code -- https://master.php.net/note/delete/95965/bad+code
Del: spam -- https://master.php.net/note/delete/95965/spam
Del: non-english -- https://master.php.net/note/delete/95965/non-english
Del: in docs -- https://master.php.net/note/delete/95965/in+docs
Del: other reasons-- https://master.php.net/note/delete/95965
Reject -- https://master.php.net/note/reject/95965
Search -- https://master.php.net/manage/user-notes.php