Dude, why don't you just check it out yourself? You'll never be 100%
certain by asking people around anyway, because most people have
distinct opinions on most issues. So then:
<?
  $lala=false;
  if ((1>2) && ($lala=(1<2)) {};
  if ($lala) {
    echo("Me, lazy?! I check EVERYTHING!");
  } else {
    echo("OK, call me lazy!");
  }
?>

Bogdan

mike cullerton wrote:

> on 1/16/02 5:57 AM, Miles Thompson at [EMAIL PROTECTED] wrote:
>
> > For "or" statements it does, but not && or xor. I don't know about you, but
> > I wouldn't want lazy evaluation on a conditional statement involving "and".
>
> i'm new to all this stuff, so i'll bite. hopefully someone can explain what
> i'm missing.
>
> if i have a statement like
>
>  if (($a == 'a') && ($b == 'b')) blahblahblah();
>
> and, $a != 'a'.
>
> why should php even look at the value for $b while evaluating this line?
> shouldn't the if fail after evaluating $a?
>
> thanks,
> mike
>
>  -- mike cullerton   michaelc at cullerton dot com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to