Fair enough, I suppose at that point it is simply a matter of preference, though I 
must maintain my
debug commentary... I really like knowing that the reason my $variable isn't 
displaying anything is
because I speeled it $varaible. :-)

Cheers,

# Nathan


----- Original Message -----
From: "Maxim Maletsky (PHPBeginner.com)" <[EMAIL PROTECTED]>
To: "'Nathan'" <[EMAIL PROTECTED]>; "'PHP'" <[EMAIL PROTECTED]>
Sent: Thursday, April 25, 2002 12:58 PM
Subject: RE: [PHP] Parse Error - Help? (AGAIN)


> I would agree that performance-wise, there may be little difference in
how fast a
> script runs. And
> for pre-defining variables, sure you can get away without doing that
and php will
> happily help you
> out. However, I find it easier to debug my code knowing whether or not
I
> remembered to assign a
> value to my variable and where the heck it got assigned from. :-)


This is true. Whatever I write I always have variable *I* created, all
the rest are $_*[] and good old $HTTP_*_VARS[]. I always had register
globals off. So, in this way, since I know that every variable is mine,
why do I have to leave error_reporting E_ALL?


> I would also like to point out that the combo of not registering
globals and having all
> errors
> reported will ensure you get the right data type when using the same
variable names
> for _POST,
> _SESSION, et cetera data. I had a few scripts that behaved differently
than I though
> because I was
> looking for the value of $foo and not realizing that my $foo was
grabbing my session
> data instead of
> what I thought I was assigning it to. I changed my php.ini and now I
tear out far less
> hair this way
> ;-)


Once again, use $_SEESION and this is resolved.
Good point about variable types. Setting them before solves this
problem.

Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins


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

Reply via email to