You may need this php function when you want to clean your url especially when extracting data from mysql will bring special characters like !, ?, @ … The url must not contain characters like those and you must replace them like in the example. SEF stands for Search Engine Friendly, so this php function will create a SEF url by cleaning it up of those unwanted characters.
Example
without cleaning your url will look like: /Mail-@-you-stopped!.php (this is not right)
with PHP SEF clean url will be like: /mail-you-stopped.php (the correct way)
Related php tutorials: