|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-03-24 17:26 UTC] fredemmott@php.net
[2016-03-25 01:21 UTC] requinix@php.net
-Status: Open
+Status: Feedback
-Package: Documentation problem
+Package: Strings related
[2016-03-25 01:21 UTC] requinix@php.net
[2016-03-25 21:43 UTC] bwoebi@php.net
[2016-04-03 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
Description: ------------ "If string is less than start characters long, FALSE will be returned." - 'less than' should be 'less than or equal to' Test script: --------------- <?php var_dump(substr('a', 0, 2)); // string(1) "a" var_dump(substr('', 0, 2)); // bool(false) var_dump(substr('a', 1)); // bool(false) Expected result: ---------------- Based on the documentation, string(1) "a", string(0) "", string(0) "" Actual result: -------------- string(1) "a" bool(false) bool(false)