getMessage(), "\n"; } ?>In the above code example, we are filtering the user input submitted via a POST request with the name "username". If any invalid characters are found in the input, an exception will be thrown and the error message will be displayed. This function is part of the PHP filter extension library.