|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-10-21 10:24 UTC] jani@php.net
[2009-11-13 19:48 UTC] svn@php.net
[2009-11-13 19:48 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 12:00:01 2025 UTC |
Description: ------------ According to documentation and reflection: iconv_substr has third argument $length, default value is 0, but iconv_substr returns different result when argument is not passed and when argument is passed as zero. (Now it's not possible to call iconv_substr with $charset argument and preserve correct behaviour.) Reproduce code: --------------- var_dump(iconv_substr('foobar', 3)); // "bar" var_dump(iconv_substr('foobar', 3, 0)); // "" var_dump(iconv_substr('foobar', 3, NULL, 'UTF-8')); // "" Expected result: ---------------- string(3) "bar" string(0) "bar" string(0) "bar" Actual result: -------------- string(3) "bar" string(0) "" string(0) ""