go to bug id or search bugs for
seems null = not empty in mb_substr()...
$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
Add a Patch
Add a Pull Request
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)
This is documented behaviour: if the length parameter weakly evaluates to int(0), false, null or an empty string may be returned. We can't fix this without a BC break, and I don't think it's worth it, personally.