Filter is in php by default from 5.2.0 and is a usefull library for web developer, so it is the time to make use of it.
It was created for validation and sanitization of foreign input, that is GET, POST, COOKIE, or anything that you can't trust on. With php filter one can tests if a variable is present in the current request:
if(filter_has_var(INPUT_POST,'login')) {
//manage login
}
Using this function a check state of a checkbox in a form could be tested as well: