fork(1) download
  1. <?php
  2. $string = 'Você está bem? 123 # ! @ ...';
  3. echo 'Text 1:'. preg_replace('/[^\w\s+$]/u', '_', $string);
  4.  
  5. echo "\n";
  6.  
  7. $string = utf8_decode('Você está bem? 123 # ! @ ...');
  8. echo 'Text 2: '. preg_replace('/[^\w\s+$]/u', '_', $string);
  9. ?>
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Text 1:Você está bem_ 123 _ _ _ ___
Text 2: