Truman Posted March 26, 2016 Share Posted March 26, 2016 I'm learning PHP from w3school tutorial and I need explenation about "!", for example take a look at this code: <?php$int = 100;if (!filter_var($int, FILTER_VALIDATE_INT) === false) { echo("Integer is valid");} else { echo("Integer is not valid");}?> Why is there exclamation mark in this code? And one more thing: if filter_validate_int ( or any other filter ) is false that is because the filter didn't catch any error and therefore, in this case integer, is valid. Did I get this correct? Link to comment Share on other sites More sharing options...
Ingolme Posted March 26, 2016 Share Posted March 26, 2016 If you've gone through the tutorial in order you must have seen the Operators section. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now