Re: Re: variable_exists() patch
| From: | walt boring | Date: | Thu, 14 Aug 2003 19:11:42 +0000 |
| Subject: | Re: Re: variable_exists() patch | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-3950@lists.php.net to get a copy of this message | ||
Timm Friebe wrote:
On Thu, 2003-08-14 at 13:18, nicos@php.net wrote: [...]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. WaltHmm, I thought a variable is set even if its value is NULL?Unfortunately it is not: thekid@friebes:~ > php -r '$a= NULL; var_dump(isset($a));' bool(false) - Timm exactly why isset() is either