NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need help understanding NULL

sequethin at gmail.com sequethin at gmail.com
Mon Aug 31 11:08:32 EDT 2009


Late to this party, but something I find useful wrt to NULL is that php's isset() will return FALSE if a variable is NULL. It would return TRUE if the same variable was set to 0 or empty string.

--Mike H

PS sorry for the top post my blackberry is being a PITA
------Original Message------
From: lists at nopersonal.info
Sender: talk-bounces at lists.nyphp.org
To: NYPHP Talk
ReplyTo: NYPHP Talk
Subject: Re: [nycphp-talk] Need help understanding NULL
Sent: Aug 30, 2009 10:12 AM

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 :)






_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/show_participation.php


Sent via BlackBerry from T-Mobile


More information about the talk mailing list