I updated my PHP and my next Script which I used to transform text without accents, and the dashed spaces (-) no longer works in PHP because ereg_replace is obsolete.
><?php
$variavel = "Céu Azul";
$variavel_limpa = strtolower( ereg_replace("[^a-zA-Z0-9-]", "-", strtr(utf8_decode(trim($variavel)), utf8_decode("áàãâéêíóôõúüñçÁÀÃÂÉÊÍÓÔÕÚÜÑÇ"),"aaaaeeiooouuncAAAAEEIOOOUUNC-")) );
echo $variavel_limpa; // ceu-azul
?>
What would be the solution for me to perform the transformation of this string (removing accents and dashing between spaces) to work in PHP 7.