What are the potential pitfalls when using multiple filters in a PHP application?

One potential pitfall when using multiple filters in a PHP application is that the order in which the filters are applied can impact the final output. To avoid unexpected results, it is important to carefully consider the order in which the filters are applied and ensure that they are applied consistently across different parts of the application.

// Example of applying multiple filters in a consistent order
$data = "123abc";
$filteredData = filter_var($data, FILTER_SANITIZE_STRING);
$filteredData = filter_var($filteredData, FILTER_SANITIZE_NUMBER_INT);

echo $filteredData;