|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2016-02-23 08:51 UTC] requinix@php.net
 
-Summary: substr('abc', 3) returns string(0) "" for php7
+Summary: [DE] substr('abc', 3) returns string(0) "" for php7
-Type:    Bug
+Type:    Documentation Problem
  [2016-02-23 08:51 UTC] requinix@php.net
  [2016-02-23 11:39 UTC] cmb@php.net
 
-Package:     Strings related
+Package:     Translation problem
-Assigned To:
+Assigned To: cmb
  [2016-02-23 11:50 UTC] cmb@php.net
  [2016-02-23 11:51 UTC] cmb@php.net
 
-Status: Assigned
+Status: Closed
  [2016-02-23 11:51 UTC] cmb@php.net
  [2016-02-23 21:26 UTC] sigma_z at sigma-scripts dot de
  [2016-02-23 21:39 UTC] requinix@php.net
  [2016-02-24 20:17 UTC] sigma_z at sigma-scripts dot de
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
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.