Re: Client side fatal PHP error
| From: | LaserJetter | Date: | Tue, 25 Dec 2001 22:10:08 +0000 |
| Subject: | Re: Client side fatal PHP error | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-78735@lists.php.net to get a copy of this message | ||
Is there a utility out there that checks for typos, like a spell check but
for code? They are the most annoying things ever and probably the hardest of
errors to find in scrips.
Something simple, even command line would be handy.
Also, its interesting that only one user of the script got the error. What
about all the others? Are they not as considerate as this one guy who
actually reported the problem?
"Philip Olson" <philip@cornado.com> wrote in message
news:Pine.BSF.4.10.10112252053030.8996-100000@localhost...
> > "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
>