> One of the downside of PHP IMHO is, that you do not have to define
> variables.  This leads to a lot of errors.  At least there should be a
> "option", which forces you to define variables, like maybe so:
>       dim $some_var;

I definitely agree there.  I've been bitten by this bug more times
than I can count.  Granted, it's always been my fault, but it would
have been nice to have something there to say "hey, this variable
hasn't been defined".  I know you can make PHP do this if you set
the error checking very, very high but in doing so, you are also
opening up another bucket of worms that you don't always need
to deal with.

> > variables in a function.  Plus, if the function gets large, 
> > it's easier to see where the value is coming from by using
> > the $GLOBALS variable.
> Now, that's the point I'm arguing here.  I don't think so.

This is definitely a matter of coding style.  Neither of us are
wrong, just a matter of preference.  In replying, I was simply
offering alternatives so that Arcadius would know all options
open to him.  I wasn't trying to say your way was erroneous
and if I came off that way, my apologies.


Reply via email to