上にある
$word = ereg_replace("\r\n|\r|\n", "", $word);
と
$word = str_replace("\r\n", "", $word);
$word = str_replace("\r", "", $word);
$word = str_replace("\n", "", $word);
では、結局、どっちが速いの?

こういうのの計測ってどうやればよいのでしょうか?