re: Using isset() and empty() hurts your code VIEW POST


I always avoid to use isset() and empty(). I even write them into coding style of projects I work.
The reason I avoid use isset() is that I don’t understand in what situations you will have to check if the value exists.
Sometimes this two struct will lead trouble when debugging. Because when the variable inside is undefined, it won’t give you an error message (it is so designed). This means if you mis-types the variable name, it will soon lead you to a debug hell...

code of conduct - report abuse