Edit report at https://bugs.php.net/bug.php?id=55241&edit=1
ID: 55241 Updated by: cataphr...@php.net Reported by: netmosfera at gmail dot com Summary: return proper FALSE value when mb_substr parameters are not computable -Status: Open +Status: Bogus Type: Feature/Change Request Package: mbstring related Operating System: any PHP Version: 5.4.0alpha2 Block user comment: N Private report: N New Comment: Works as designed. The fact substr and mb_substr do not have the same behavior does not mean one of the is wrong. Besides, there would be compatibility issues in changing the behavior of one of them. Previous Comments: ------------------------------------------------------------------------ [2011-07-20 05:24:47] netmosfera at gmail dot com yes but no one uses mbstring overload in plus it is nearly-always not available on hosts, because it can't be enabled per-dir (read: https://bugs.php.net/bug.php?id=51415) so i think this should be fixed ------------------------------------------------------------------------ [2011-07-20 05:12:39] lonnyk at gmail dot com Bug #28899 was committed in Rev.#203546 ------------------------------------------------------------------------ [2011-07-20 05:11:35] lonnyk at gmail dot com This was taken care of in https://bugs.php.net/bug.php?id=28899 If you turn on mbstring.func_overload mb_substr will return false. Otherwise it returns "" ------------------------------------------------------------------------ [2011-07-19 11:59:10] netmosfera at gmail dot com Description: ------------ hi, it is possible to make mb_substr work exactly like substr? substr("",0,10) // returns false mb_substr("",0,10) // returns "" substr("abc",7,1) // returns false mb_substr("abc",7,1) // returns "" thank you ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55241&edit=1