Re: Friday morning brain farts....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12:10 PM +0200 8/13/07, Tijnema wrote:
On 8/13/07, tedd <tedd@xxxxxxxxxxxx> wrote:
But, if I see this:
 >
 if(!isset($argv[1],$argv[2],$argv[3])))

 My first thought is "Is this OR or AND"? And my second thought is "If
 this is OR, then what's AND?"

 Being dyslexic I'm easily confused that way (seriously, that's the
 reason I never use an else-if).

 Cheers,

 tedd

Well, actually,
if(!isset($argv[1],$argv[2],$argv[3])))
is AND.
As it is the same as this:
if( ! ( isset($argv[1]) && isset($argv[2]) && isset($argv[3]) ) )
Which most of us write
if (!isset($argv[1]) || !isset($argv[2]) || !isset($argv[3]))

All three have the same result ;)

Could be for most of you, but that would still be a stumbling block for me. However, I can always find a way that works.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux