0
Regex101.com seems to think you can simply combine \s{2,} and [\t\n] into \s{2,}[\t\n] and it should have the same effect:
$string = preg_replace(array('/\s{2,}/', '/[\t\n]/'), ' ', $string);
into:
$string = preg_replace('/\s{2,}[\t\n]/', ' ', $string);
You should add whitespace between...