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

FULL DISCUSSION
 

A situation where isset makes sense for me is checking $_POST. It's completely legitimate for a key to not be have been sent by the client.

 

In this case you’d be interested in both questions: does a value exist and is it something useful. I agree, it makes sense.

 

You could use filter_input and get much more useful info back than isset.

code of conduct - report abuse