In general that is not the point because it may replace a second or third byte of a unicode sequence that is equal to the space char. but:

>     Note: This function is binary-safe.

http://de3.php.net/manual/en/function.str-replace.php