|
Posted by Michael G on 08/01/05 06:38
"jamen" <jamen@invalid> wrote in message
news:42ed94b9$0$177$edfadb0f@dtext02.news.tele.dk...
> Michael G wrote:
>
>> $PHONETIC is an array of strings. How can !$PHONETIC['d'], in the case
>> below, evalutae to true. It is a string not a boolean. It would make more
>> sense if it evalutated to null.
>
>> $PHONETIC = array('a' => 'alpha', 'b' => 'bravo', 'c' => 'charlie');
>
> Actually, I think it does. Try:
I know it does, my question is why does it. It seems like an abuse of the
syntax but according to the link below it is not at least in the named
cases.
The following link states a number of cases for boolean conversion. It does
state that an array with zero elements will be converted to FALSE but not
the case above where an array element is not set. Maybe I am reading too
much into it...
http://us2.php.net/manual/en/language.types.boolean.php#language.types.boolean.casting
Mike
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Navigation:
[Reply to this message]
|