NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need help understanding NULL

lists at nopersonal.info lists at nopersonal.info
Sun Aug 30 10:12:05 EDT 2009


Hans Zaunere wrote:
> NULL is just a type - a type that can only ever be one thing - NULL

I think I get that part now: The moment it has a known value, even if
that value is '' or zero, then it's no longer NULL (at least in the
world according to MySQL).

> NULL comes from pointers, largely where there can be null references
> or pointers.  It's an address that doesn't point anywhere, but is
> some way pointed to and acknowledged, thus it's not purely
> non-existent (yes, we could argue for years on the subtle meanings of
> NULL, void, undefined, etc. :)

Hans, you're going to make my head explode. LOL

> As always, there's only one real resource these days:
> 
> http://en.wikipedia.org/wiki/Null

Oddly, while I go to Wikipedia probably a dozen times a day for answers,
it never occurred to me to look up NULL there. Go figure.

> To me, pragmatically, NULL really only comes down to one thing - it's
> a special type that always has a single value.  Different languages
> and environments then utilize this type differently, and add their
> own meanings.  Thus you need to read the different environment's docs
> to learn how NULL is treated specifically in that environment, and
> how it affects getting things down in that environment.  There is no
> "global" real meaning of NULL - it's language specific.

Noted.

> Other than that NULL is meaningless - it's NULL :)

Bev :)









More information about the talk mailing list