fork(1) download
  1. <?php
  2.  
  3. $text = "O céu azul foi visto por André, João…";
  4. $text = preg_replace("/[^\w\s]/", "", iconv("UTF-8", "ASCII//TRANSLIT", $text));
  5. $text = str_replace(" ", "-", $text);
  6. $text = strtolower($text);
  7.  
  8.  
  9. echo $text;
Success #stdin #stdout 0.02s 24272KB
stdin
Standard input is empty
stdout
o-ceu-azul-foi-visto-por-andre-joao