PHP – The headache of checking if a variable is set!
To check if a variable is set there are two main approaches, depending on the meaning of "set". Set can mean exists and is not null, but can also mean exists and not empty! In a code words: Is $var1 = "" set or not? is $var2 = 0 set…