Date: 10/21/00
- Next message: Thimble Smith: "[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/mysql/libmysql config-win.h libmysql.dsp"
- Previous message: Jason Greene: "Re: [PHP-DEV] patch - adds new setting safe_mode_hide_env_vars"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 6772
Updated by: jmoore
Reported By: tjabo <email protected>
Status: Closed
Bug Type: Documentation problem
Assigned To:
Comments:
The documentation is correct, although the one line description is slightly ambigious there is no real problem if you read the actual docs rather than the one line description.
Previous Comments:
---------------------------------------------------------------------------
[2000-10-15 08:16:25] lyric <email protected>
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)
---------------------------------------------------------------------------
[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: Thimble Smith: "[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/mysql/libmysql config-win.h libmysql.dsp"
- Previous message: Jason Greene: "Re: [PHP-DEV] patch - adds new setting safe_mode_hide_env_vars"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

