Date: 10/15/00
- Next message: Zeev Suraski: "[PHP-DEV] PHP 4.0.3pl1"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #7139 Updated: php_value / auto_prepend_file .... not well documented"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 6772
Updated by: lyric
Reported By: tjabo <email protected>
Status: Analyzed
Bug Type: Documentation problem
Assigned To:
Comments:
Which documentation are you using? The _body_ of the documentation for the functions you're talking about describes their return types correctly. (Yes, the one line summary is "find the last occurance of a char in a
string", which is logically correct)
Previous Comments:
---------------------------------------------------------------------------
[2000-09-15 16:51:05] tjabo <email protected>
I haven't found this topic in the bug database.
the docs say, both strrpos and strrchr "find the last occurance of a char in a string".
thats wrong.
- strrpos finds the last occurance of a string in a string, and returns the position.
- strrchr finds the last occurance of a string in a string, and returns the string from the position up to the end.
Testprogram:
<h1>strrchr() / strrpos()</h2>
<?
# sttrchr/strrpos documentation bug
# testprogram
# Author: tjabo <email protected>
$haystack = "bla.deoa.se_blah.deschnorg";
$needle = ".de";
$needle2 = 'o';
print "Haystack = $haystack<br>n";
print "Needle = $needle<br>n";
print "strrchr: " . strrchr($haystack, $needle) . "<br>n";
print "strrpos: " . strrpos($haystack, $needle) . ":" . substr($haystack,strrpos($haystack, $needle),strlen($needle)) . "<br>n";
?>
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6772
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Zeev Suraski: "[PHP-DEV] PHP 4.0.3pl1"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #7139 Updated: php_value / auto_prepend_file .... not well documented"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

