Simplifica uma string usando htmlentities
<?php
$string = utf8_decode('Acentuação de casos grandes ');
$str = strtolower($string);
$str = trim($str);
$str = htmlentities($str);
$str = preg_replace('@\&(\w)[^;]+;@', '\1', $str);
$str = preg_replace('@\s+@', '-', $str);
print $str;