Jump to content

majuk

Members
  • Posts

    1
  • Joined

  • Last visited

majuk's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. In the lesson on PHP Filters in the code sample "Validate an Integer" there is the following code: <?php $int = 100; if (!filter_var($int, FILTER_VALIDATE_INT) === false) { echo("Integer is valid"); } else { echo("Integer is not valid"); } ?> Why use this expression: (!filter_var($int, FILTER_VALIDATE_INT) === false) instead of what seems to me to be the more logical expression?: (filter_var($int, FILTER_VALIDATE_INT) === true) Thanks.
×
×
  • Create New...