*isset() != empty()*, dont belive on everything eway says !!
isset() != empty() , just use empty... is way more reliable
Written by Fredy Lievano
Related protips
3 Responses
This is different functions and you are using them wrong. You need to use isset() when you aren't sure variable or key is setted. Otherwise it makes notice error (I don't recomend to disable notices - this is a good sign about problems in code). If you are sure variable/key is setted and need to verify empty that or not - use empty() or this construction:
if (!!$var){
//not empty
}
@border-radius Thats the whole point of the note, the "EWAY" payment system documentation uses isset() with the purpose of checking the if a variable has a value wicht is absolutely wrong. to check is a variable has a value the right thing to do is use empty.
@border-radius empty() does not generate any kind of message for a variable that doesn't exist. This is mentioned in the documentation for empty: http://php.net/empty