title: Can str_replace be safely used on a UTF-8 encoded string if it's only given valid UTF-8 encoded strings as arguments?
body: <p>PHP's <code>str_replace()</code> was intended only for ANSI strings and as such can mangle UTF-8 strings. However, given that it's binary-safe would it work properly if it was only given valid UTF-8 strings as arguments?</p>
  
  <p>Edit: I'm not looking for a replacement function, I would just like to know if this hypothesis is correct.</p>