Doc #73123 [Opn->Asn]: Substr documentation is wrong and misleading

From: Date: Sun, 30 Dec 2018 03:44:15 +0000
Subject: Doc #73123 [Opn->Asn]: Substr documentation is wrong and misleading
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16253@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73123&edit=1 ID: 73123 Updated by: girgias@php.net Reported by: gregoire dot daussin at gmail dot com Summary: Substr documentation is wrong and misleading -Status: Open +Status: Assigned Type: Documentation Problem Package: Strings related -PHP Version: 5.6.26 +PHP Version: Irrelevant -Assigned To: +Assigned To: girgias Block user comment: N Private report: N New Comment: I will have a look at it, however, this applies to all non-mb_ functions. Previous Comments: ------------------------------------------------------------------------ [2016-09-20 10:49:00] gregoire dot daussin at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.substr --- Substr documentation talks about characters everywhere, while the function does not cut string characters wise but bytes wise, this is especially true for UTF-8. The documentation should talk about bytes, and make a note about mb_substr. Please fix, it is confusing, I've lied to since years :(. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73123&edit=1

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