Doc #70177 [Opn->Csd]: Undecumented changes in mb_substr behavior

From: Date: Fri, 31 Jul 2015 17:11:25 +0000
Subject: Doc #70177 [Opn->Csd]: Undecumented changes in mb_substr behavior
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12566@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70177&edit=1 ID: 70177 Updated by: cmb@php.net Reported by: teo8976 at gmail dot com Summary: Undecumented changes in mb_substr behavior -Status: Open +Status: Closed Type: Documentation Problem -Package: Documentation problem +Package: mbstring related Operating System: all PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2015-07-31 17:10:29] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=337268 Log: fixed documentation wrt. $start and $length parameters (fixes #70177) ------------------------------------------------------------------------ [2015-07-31 16:08:53] teo8976 at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.mb-substr --- Check this: http://3v4l.org/e1Pc4 1) The behavior of mb_substr with a negative value as first parameter is completely undocumented. (except for a user's comment) As expected, it matches that of substr, using the negative value as a starting character counting from the end of the string, but it needs to be documented. 2) The behavior with a negative value as the first parameter and NULL as the second changes at version 5.4.8 Starting from that version, it behaves as expected (taking the string to its end); previous to that version it returns an empty string. The behavior in older versions was obviously a bug, but the change should be documented. Also, if there's a value to be used instead of NULL as a workaround, that needs to be documented too. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70177&edit=1

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