lopes_andre Posted June 13, 2010 Share Posted June 13, 2010 Hi, Sorry for this question, but I don't know what this simple line of code do. $salt = $this->store_salt ? $this->salt() : FALSE; Dont pay attention to the variables, just explain me how works the XX ? XXX : FALSE; Can some one help me? Best Regards, Quote Link to comment Share on other sites More sharing options...
cmgmyr Posted June 13, 2010 Share Posted June 13, 2010 It's just another way to handle an IF ELSE statement if($this->store_salt){ $salt = $this->store_salt; }else{ $salt = FALSE; } Quote Link to comment Share on other sites More sharing options...
phant0m Posted June 13, 2010 Share Posted June 13, 2010 http://www.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted June 13, 2010 Share Posted June 13, 2010 The "?:" is a Ternary Operator: From the manual (scroll down a little) The expression (expr1) ? (expr2) : (expr3) evaluates to expr2 if expr1 evaluates to TRUE, and expr3 if expr1 evaluates to FALSE. Ken Quote Link to comment Share on other sites More sharing options...
lopes_andre Posted June 13, 2010 Author Share Posted June 13, 2010 Thanks for the reply's. Solved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.