|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-06-23 22:12 UTC] moriyoshi@php.net
[2004-12-15 04:19 UTC] sniper@php.net
[2004-12-20 10:28 UTC] moriyoshi@php.net
[2004-12-20 13:58 UTC] mauroi at digbang dot com
[2005-02-03 03:25 UTC] sniper@php.net
[2005-02-23 16:56 UTC] drraf at tlen dot pl
[2005-12-21 23:21 UTC] sniper@php.net
[2005-12-23 12:19 UTC] hirokawa@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
Description: ------------ if I make the following call I get FALSE. var_dump(substr('', 0)); The documentation says "If string is less than start characters long, FALSE will be returned". That can be very ambiguous because start is 0 and the length of the string is 0 (not less). Another problem: mb_substr does not work like this. If you overload the functions and make the same call as above it will return an empty string. Thanks in advance. Reproduce code: --------------- var_dump(substr('', 0)); var_dump(mb_substr('', 0)); Expected result: ---------------- '' '' Or FALSE FALSE Actual result: -------------- FALSE ''