rootKID Posted April 2, 2020 Share Posted April 2, 2020 Hi W3S! Been a while! So, i have a question in relation to an if/else statement. It has been a while since ive build websites and want back in the game. i came across a cms system last night, relatively new, it's one of my friends local build im checking out. In an if/else statement, he is putting something like this down: !@( $GLOBALS["{$DB['globals']}"] = mysqli_connect( $DB['host'], $DB['user'], $DB['password'] ) ) Now i know everything inside of the if/else statement, but why the "!@" in the if statement in front of it? Is it just not enough with the "!" sign? Thanks in advance for clarification Regards, rootKID. Link to comment Share on other sites More sharing options...
ckrudelux Posted April 2, 2020 Share Posted April 2, 2020 @ means that it suppress any error triggered by that expression. https://www.php.net/manual/en/language.operators.errorcontrol.php Link to comment Share on other sites More sharing options...
Ingolme Posted April 2, 2020 Share Posted April 2, 2020 The error suppression operator is a very hacky solution to prevent warnings. If your code needs this then there is something wrong with your code. Link to comment Share on other sites More sharing options...
rootKID Posted April 3, 2020 Author Share Posted April 3, 2020 ok got it, thanks for information ^^' 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