You have to be cautious of double line breaks, which would cause double spaces. Use this really efficient regular expression:
$string = trim(preg_replace('/ss+/', ' ', $string));
Multiple spaces and newlines are replaced with a single space.
Edit: As others have pointed out, this solution has issues matching single newlines in between words. This is not present in the example, but one can easily see how that situation could occur. An alternative is to do the following:
$string = trim(preg_replace('/s+/', ' ', $string));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…