If the mbstring.func_overload ini setting is set to & 2, it will overload the strlen function to mb_strlen, which causes problems when using it to count the number of bytes.
Causing: strlen(hextobin("c708")) === 1
It may be helpful to wrap all strlen calls in a function that checks for this ini setting, and if it's set, use
mb_strlen($str, '8bit') instead just to reduce headaches in environments where this is on.