Timm Friebe wrote:

On Thu, 2003-08-14 at 13:18, [EMAIL PROTECTED] wrote:
[...]


Hmm, I thought a variable is set even if its value is NULL?



Unfortunately it is not:


[EMAIL PROTECTED]:~ > php -r '$a= NULL; var_dump(isset($a));'
bool(false)

- Timm




exactly why isset() is either
1) a bad name for the function or
2) 'broken'

Since the isset() documentation explicitly warns that it will return false if
the value is set and is NULL, one could say that option 2 is invalid. So,
in my opinion isset() is really a bad choice for a name of that functionality,
and why something like variable_exists() is needed.


Maybe it could just be called exists() ?

I'm sure changing the functionality of isset() isn't really an option at this
point for all of the existing apps that use it.


Walt

Reply via email to