DEV Community

Discussion on: Using isset() and empty() hurts your code

Collapse
 
hpwesterlund profile image
Hans Westerlund

I know this is a dated article but regarding isset I feel the need to point out the difference between a language construct and a function!

isset isn't a function but a language construct, if you don't know the difference look it up.

TLDR: isset is a lot faster than even built-in functions as is_null. So imho isset should always be preferred cause performance does matter even for websites with moderate loads but certainly for any processing however light.