Re: PHP 7.1 - Address PHPSadness #28?

From: Date: Wed, 23 Sep 2015 09:57:32 +0000
Subject: Re: PHP 7.1 - Address PHPSadness #28?
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-88433@lists.php.net to get a copy of this message
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]

« previous php.internals (#88433) next »