3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function ttrim($s) { return preg_replace("/\s{2,}/", " ", trim($s)); } $s = 'Etui à fire farger'; var_dump(ttrim($s));
based on 7lOSp
Output for 4.3.0 - 7.2.6
string(19) "Etui à fire farger"