#43523 [Opn]: strrchr description inaccurate

From: Date: Thu, 06 Dec 2007 20:02:48 +0000
Subject: #43523 [Opn]: strrchr description inaccurate
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-326@lists.php.net to get a copy of this message
ID: 43523 User updated by: php at htmlland dot net Reported By: php at htmlland dot net Status: Open Bug Type: Documentation problem Operating System: N/A PHP Version: Irrelevant New Comment: The same applies for strstr and stristr. Thanks, Mike Previous Comments: ------------------------------------------------------------------------ [2007-12-06 19:59:21] php at htmlland dot net Description: ------------ THe description is currently "string strrchr(string $haystack,string $needle)". The needle should be of mixed type as later in the documentation it says: If needle is not a string, it is converted to an integer and applied as the ordinal value of a character. Plus the example even shows this!: // get everything after last newline $text = "Line 1\nLine 2\nLine 3"; $last = substr(strrchr($text, 10), 1 ); Thanks, Mike ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43523&edit=1

« previous php.doc.bugs (#326) next »