Re: [PHP] distinguish between null variable and unset variable
- From: danbrown@xxxxxxx (Daniel Brown)
- Date: Wed, 21 Jan 2009 21:11:56 -0500
On Wed, Jan 21, 2009 at 20:27, Jack Bates <ms419@xxxxxxxxxxxxxx> wrote:
How can I tell the difference between a variable whose value is null and
a variable which is not set?
Unfortunately, in PHP - like other languages - you can't.
A variable is considered to be null if:
* it has been assigned the constant NULL.
* it has not been set to any value yet.
* it has been unset().
--
</Daniel P. Brown>
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!
.
- Follow-Ups:
- Re: [PHP] distinguish between null variable and unset variable
- From: Shawn McKenzie
- Re: [PHP] distinguish between null variable and unset variable
- From: Lars Torben Wilson
- Re: [PHP] distinguish between null variable and unset variable
- References:
- distinguish between null variable and unset variable
- From: Jack Bates
- distinguish between null variable and unset variable
- Prev by Date: distinguish between null variable and unset variable
- Next by Date: Re: [PHP] distinguish between null variable and unset variable
- Previous by thread: distinguish between null variable and unset variable
- Next by thread: Re: [PHP] distinguish between null variable and unset variable
- Index(es):
Relevant Pages
|