I have to say in all my years of PHP programming, I have never encountered a problem with isset()
returning false on a null variable. OTOH, I have encountered problems with isset()
failing on a null array entry - but array_key_exists()
works correctly in that case.
For some comparison, Icon explicitly defines an unused variable as returning &null
so you use the is-null test in Icon to also check for an unset variable. This does make things easier. On the other hand, Visual BASIC has multiple states for a variable that doesn't have a value (Null, Empty, Nothing, ...), and you often have to check for more than one of them. This is known to be a source of bugs.