Michael Wallner wrote on 23/09/2015 09:38:
>>if the variable does not exist there is no way of testing for that
>>state
>>prior to calling is_null()
>
>Correct, there is no way of testing for that full stop.
There is, though, not sure if already mentioned:
array_key_exists(“var”, get_defined_vars()) && is_null($var)
I wondered if someone would mention that, but didn't want to drift too
far from the point, which was the "prior to call is_null()" part of
Lester's sentence was redundant, since the problem was entirely
unrelated to is_null().
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php