* Thus wrote Robert Cummings ([EMAIL PROTECTED]):
> 
> Now the point of the discussion is not to indicate who is right or who
> is wrong -- that would appear to be a ridiculous argument. I am more
> interested in finding out the practices and experience of PHP
> developers. I'd like to know how many people treat null as a value, and
> how many do not. For instance to you ever assign default values of null
> to instance variables, or local variable, or array entries? I know in
> practice that I have, and find it quite convenient to represent a
> default value.

I've never used null as a value. Basically I just use '' as a null
value, which changes some logic I used vs. other languages. for
instance, take these values (or non values):

  false, 0, '', "", null

if each is seperaly assigned to a variable the expression always
yields the same:

  if ( $var) { }

Which is why, I assume, the === operater was born.  Although I've
only used that operater maybe once or twice, because I have been
used to having my logic not rely on the type of data that is
stored.

This also leads me to believe that the statement:

  if ($var === null) {}

would be considered illegal or  fail no matter what since null is
not a value and has no type associated with it.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to