Edit report at https://bugs.php.net/bug.php?id=62703&edit=1

 ID:                 62703
 Updated by:         [email protected]
 Reported by:        spam02 at live dot com
 Summary:            substr() length=null
 Status:             Open
 Type:               Bug
 Package:            Strings related
 Operating System:   Linux
 PHP Version:        5.3.15
 Block user comment: N
 Private report:     N

 New Comment:

yeah, null also can be considered as 0, so, this is a little confused. the fix 
will be easy, however fixing this might introduce bc break(not sure)


Previous Comments:
------------------------------------------------------------------------
[2012-07-31 11:17:46] spam02 at live dot com

Description:
------------
seems null = not empty in mb_substr()...
//example
$text = 'test';

mb_substr($text,-1);  //result t
mb_substr($text,-1,null) //result '' expected t
substr($text,-1); //result t
substr($text,-1, null) //result '' expected t
php version 5.3.3-7+squeeze13



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62703&edit=1

Reply via email to