<?php
function sanitize_title($title) {
// substitui espaços por "-"
// faz a transliteração pra ASCII
$title = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $title);
// remove qualquer outra coisa inválida da url
}
echo sanitize_title('César Sousa') . "\n";
echo sanitize_title('áéíóú@#_888999-teste outras palavras');
PD9waHAKCnNldGxvY2FsZShMQ19BTEwsICdwdF9CUi5VVEYtOCcpOwoKZnVuY3Rpb24gc2FuaXRpemVfdGl0bGUoJHRpdGxlKSB7CgkvLyBzdWJzdGl0dWkgZXNwYcOnb3MgcG9yICItIgoJJHRpdGxlID0gcHJlZ19yZXBsYWNlKCcjXHMrIycsICctJywgJHRpdGxlKTsKCQoJLy8gZmF6IGEgdHJhbnNsaXRlcmHDp8OjbyBwcmEgQVNDSUkKCSR0aXRsZSA9IGljb252KCdVVEYtOCcsICdBU0NJSS8vVFJBTlNMSVQvL0lHTk9SRScsICR0aXRsZSk7CgoJLy8gcmVtb3ZlIHF1YWxxdWVyIG91dHJhIGNvaXNhIGludsOhbGlkYSBkYSB1cmwKCSR0aXRsZSA9IHByZWdfcmVwbGFjZSgnI1teYS16QS1aMC05Xy1dKyMnLCAnJywgJHRpdGxlKTsKCQoJcmV0dXJuIHN0cnRvbG93ZXIoJHRpdGxlKTsKfQoKZWNobyBzYW5pdGl6ZV90aXRsZSgnQ8Opc2FyIFNvdXNhJykgLiAiXG4iOwplY2hvIHNhbml0aXplX3RpdGxlKCfDocOpw63Ds8O6QCNfODg4OTk5LXRlc3RlIG91dHJhcyAgcGFsYXZyYXMnKTsK