ID: 22884 User updated by: sebastien at mouzaia dot com Reported By: sebastien at mouzaia dot com Status: Bogus Bug Type: Unknown/Other Function Operating System: linux PHP Version: 4.3.1 New Comment:
Yes :-( Sorry. Thanks. Previous Comments: ------------------------------------------------------------------------ [2003-03-26 04:09:57] michael dot mauch at gmx dot de Does your copy of the manual also have the sentence: If needle contains more than one character, the first is used. ------------------------------------------------------------------------ [2003-03-26 02:52:11] sebastien at mouzaia dot com Hello Moriyoshisan I know the manual by hart :-) I read in it: This function returns the portion of haystack which starts at the last occurrence of needle and goes until the end of haystack. In my sample, it prints "wings" if I use the word "drawings" and what is expected, "/wip/drazings" if I use the word "drazings". This is not a bug ? Thanks for your consideration. ------------------------------------------------------------------------ [2003-03-25 18:06:08] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php See http://www.php.net/manual/en/function.strrchr.php. As described in the documentation, strrchr() doesn't work in the opposite way of strchr(). ------------------------------------------------------------------------ [2003-03-25 17:49:59] sebastien at mouzaia dot com <? print(phpversion().'<br>'); $string = "public_html/concepts/2L_vuda_dupont/wip/drawings"; $return = strrchr($string,'wip/'); print($return.'<br>'); // print wings WHY ??? print("<hr>"); $string = "public_html/concepts/2L_vuda_dupont/wip/drazings"; $return = strrchr($string,'wip/'); // print /wip/drazings(OK) print($return.'<br>') // tested on a 4.3.1 linux and on a 4.3.0 windows ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22884&edit=1