php-general | 2001122
Date: 12/25/01
- Next message: David: "Re: Re: [PHP] 4.10 New Vars Question"
- Previous message: Philip Olson: "Re: [PHP] 4.10 New Vars Question"
- In reply to: jjt: "Re: [PHP] Client side fatal PHP error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
because the way && is evaluated.
if the first part of the && expression is false, then it doesn't even
attempt to look at the second part, meaning you get a fastest evaluation
:)...
I think its called Lazy Logic or something, I know its in the PHP Manual
somewhere :)
Andrew
----- Original Message -----
From: "jjt" <jjt3d <email protected>>
To: <php-general <email protected>>
Sent: Wednesday, December 26, 2001 1:53 AM
Subject: Re: [PHP] Client side fatal PHP error
> Ah yes... that would do it. How embarrassing! But another respondent
brought
> up an interesting question. Why does this error not show up every time? As
> written, it is a basic syntactical error. I tested this thing up and down;
I
> test it in production every day.
>
> Ah.... it's always something.... thanks much.
>
>
> Philip Olson wrote in message ...
> >> "Call to unsupported or undefined function srtoupper() in.... on line
> 82."
> >
> >srt != str (typo).
> >
> >> if (strtoupper(substr($xmbrcode,11,1)) != "B" &&
> >> strtoupper(substr($xmbrcode,11,1)) != "P" &&
> >> srtoupper(substr($xmbrcode,11,1)) != "H" &&
> >> srtoupper(substr($xmbrcode,11,1)) != "O").... {
> >
> >See above. Btw, consider something like:
> >
> > $str = '123456789abcdef';
> > $bad = array('B','P','H','O');
> >
> > if (in_array(strtoupper($str{11}),$bad)) {
> > echo 'boo';
> > }
> >
> >I can't believe people code on Christmas :)
> >
> >Warm regards,
> >Philip Olson
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: David: "Re: Re: [PHP] 4.10 New Vars Question"
- Previous message: Philip Olson: "Re: [PHP] 4.10 New Vars Question"
- In reply to: jjt: "Re: [PHP] Client side fatal PHP error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

