Can I do this? (I can’t test it at the moment to see for myself)
public function overSimplifiedTernaryTest($condition = false) {
return ($condition) ? 'someString' : 'someOtherString';
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It works and next time you can use ideone.com to test your code instead of asking question.
Your code : http://ideone.com/2oHkF
You can also refer to this question for additionnal online tool to test your code.