- var_dump: documentation ( source)
- trim: documentation ( source)
- preg_replace: documentation ( source)
- strtolower: documentation ( source)
<?php
$string = 'This is a test!';
var_dump(trim(preg_replace('/[^a-zA-Z0-9aîâs?t?AÎÂST\s\-]/u','', strtolower($string))));