Difference between filter_var and filter_input on input data validation
<p>What's the difference between using one of these two functions when validating user input? Strictly regarding the function calls, there's no requirement to change the $_POST array for instance.</p>

<blockquote>
  <p>$result = filter_var($_POST['user_input'], FILTER_VALIDATE_INT);</p>
</blockquote>

<p>vs </p>

<blockquote>
  <p>$result = filter_input(INPUT_POST, 'user_input', FILTER_VALIDATE_INT);</p>
</blockquote>

<p>Or there's no difference between the two calls above, not even performance wise, but rather just a matter of preference?</p>

<p>PS: I know there's a similar question on SO - <a href="https://stackoverflow.com/questions/31049178/differences-between-filter-var-and-filter-input">Differences between filter_var and filter_input</a> - but that just states how the 2 methods should be called, not what's the actual difference.</p>