What is better and why:
Somewhat strange question. These are different functions and they perform different actions. It is enough to look into the documentation to make sure of this and understand that they should not be compared. It's like "what's better echo or var_dump ?". And this and that displays something on the screen.
The filter_var function returns the filtered value. In your example, it will return not TRUE but 12345. This is very important to understand and this is a very big difference.