note 27379 deleted from function.empty by sniper
| From: | sniper@php.net | Date: | Sat, 23 Aug 2003 00:19:05 +0000 |
| Subject: | note 27379 deleted from function.empty by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-54907@lists.php.net to get a copy of this message | ||
Note Submitter: chris at chaska dot com
----
It does appear to be superfluous -- you're right. I assume you are saying that inside the
function, it is impossible for the variable $var to be unset. That certainly makes sense, as that
is a common behavior for other languages.
I suppose when I wrote the function years ago I was just making sure I did not try to trim() and/or
strlen() an unset variable, since it was not clear what PHP would do in such a case. Depending on a
few emperical tests doesn't seem safe. I also suppose that if I looked long and hard, I
*might* find someplace in some obscure corner of the PHP documentation some note about
"local" variables to a function always being set, not unset.
Great. I can simplify my function.