Lester Caine wrote on 18/09/2015 15:39:
On 18/09/15 15:06, Rowan Collins wrote:
A PHP variable can have all sorts of states, because you can take
advantage of loose typing:
$date = new DateTime();
$date = null;
$date = 'TODAY';
$date = -1;
$date = M_PI;
And isset() returns true for every one but 'null' so how do I identify a
variable that isset=null?
Why do you need to, when you've got all these values to choose from? Why
concentrate on the thing you can't do, when you could look at the huge
array of things you can do?
Yes, if exists() existed, you could use it as an extra state, but it
doesn't, so you can't.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php