<?php

$text = "O céu azul foi visto por André, João…";
$text = preg_replace("/[^\w\s]/", "", iconv("UTF-8", "ASCII//TRANSLIT", $text));
$text = str_replace(" ", "-", $text);
$text = strtolower($text);


echo $text;