I found this list useful for binary string manipulation. List of php binary safe string functions:
mb_substr
mb_strlen
mb_str_split
mb_substr_count
str_replace
mb_strpos
mb_substr_replace
The problem is, if the function is not binary safe it will still probably work most of the time. This is not an acceptable level of fault tolerance for the professional. It must work with every string. Good luck with your projects!