substr() implementation that isn't brittle to mbstring.func_overload
This version uses mb_substr() in '8bit' mode to treat strings as raw binary rather than UTF-8, ISO-8859-1, etc
Parameters | |||
---|---|---|---|
string
|
$binary_string |
# | |
int
|
$start |
# | |
int|null
|
$length = null |
(optional) |
# |
Returns | |
---|---|
string
|
Throws | |
---|---|
TypeError |