Richard Lynch wrote:
On Tue, June 20, 2006 2:38 am, Satyam wrote:
I come from languages
where
you not only have to initialize a variable but have to declare it as
well so
initializing comes natural, I feel wrong if I don't do it, even if the
interpreter does not care.
Just to be pedantic...
The interpreter actually DOES care, but you have to be wise enough to
enable E_NOTICE messages for the interpreter to tell you that it does
care.
You may want to get in the habit of using .htaccess to do that, as you
will be more comfy with PHP helping you catch any typos in failing to
initialize vars.
:-)
I do that here....our development and staging servers have all errors
turned on whereas on our production server, pretty much everything is
turned off. In a /perfect/ world, you would never see an error in my
code, as I _try_ to write clean code, and trap all the errors before
they get to the screen (no, not by the use of '@'). Since this is not a
perfect world, and I don't always write clean code, it's nice to see
those notices/errors pop up on the screen before the code gets live. ;)
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php