Bug->Doc #71648 [Opn]: [DE] substr('abc', 3) returns string(0) "" for php7

From: Date: Tue, 23 Feb 2016 08:51:09 +0000
Subject: Bug->Doc #71648 [Opn]: [DE] substr('abc', 3) returns string(0) "" for php7
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13208@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71648&edit=1 ID: 71648 Updated by: requinix@php.net Reported by: sigma_z at sigma-scripts dot de -Summary: substr('abc', 3) returns string(0) "" for php7 +Summary: [DE] substr('abc', 3) returns string(0) "" for php7 Status: Open -Type: Bug +Type: Documentation Problem Package: Strings related Operating System: Ubuntu 14 PHP Version: 7.0Git-2016-02-23 (snap) Block user comment: N Private report: N New Comment: German translation is out of date. http://php.net/manual/de/function.substr.php Previous Comments: ------------------------------------------------------------------------ [2016-02-23 08:04:41] sigma_z at sigma-scripts dot de Description: ------------ When using substr on the end of a given string than it returns an emtpy string instead of a boolean false for php7 or greater. Test script: --------------- for php < 7 <?php substr('abc', 3) returns false ?> for php >= 7 <?php substr('abc', 3) returns string(0) "" ?> The documentation says (which does not apply for php7): <?php var_dump(substr('a', 1)); // bool(false) ?> Expected result: ---------------- Whether update the documentation on http://php.net/manual/en/function.substr.php if this is the desired behavior or fix substr() when trying to get the string on the end of the given string. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71648&edit=1

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