I don't think performance should be as much of a concern as security.
When you get warnings about undefined variables, it should make you
think about where this variable's value is coming from. If
register_globals is off, then this isn't as much of an issue. If I use
$id, at least I know it's not coming from user input. 

Either way, you should develop with E_ALL so that you can make sure that
variables are set and checked correctly and to spot all the
mistakes/holes that you can. Once you go live, you set it so that NO
errors are reported (default in PHP 4.2) so that viewers can't glean any
info from failed scripts like path directories and file names...

---John Holmes...

> -----Original Message-----
> From: Maxim Maletsky (PHPBeginner.com)
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 11:19 AM
> To: 'Nathan'; 'PHP'
> Subject: RE: [PHP] Parse Error - Help? (AGAIN)
> 
> You know, I once said the same: better fix the notices and keep the
code
> "clean". But as I've done several performance tests I came to a
> conclusion that there's no much difference debugging the code yourself
> or let PHP doing it. Often predefining manually a variable resulted to
> me being even more 'expensive' then when PHP debugs it. I think it is
> wise using this feature of PHP. The only reason not to is for having
the
> full control of your code.
> 
> Just my 2 Eurocents
> 
> Sincerely,
> 
> Maxim Maletsky
> Founder, Chief Developer
> 
> www.PHPBeginner.com   // where PHP Begins
> 
> 
> 
> > -----Original Message-----
> > From: Nathan [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, April 25, 2002 7:15 PM
> > To: PHP
> > Subject: Re: [PHP] Parse Error - Help? (AGAIN)
> >
> > I'll second that one... always better to code with register_globals
=
> Off and E_ALL
> > reporting level
> > IMHO.
> >
> > # Nathan
> >
> > ----- Original Message -----
> > From: "Philip Olson" <[EMAIL PROTECTED]>
> > To: "Maxim Maletsky (PHPBeginner.com)"
<[EMAIL PROTECTED]>
> >
> > > To stop receiving the messages from undefined variables add this
at
> top
> > > of your files:
> > >
> > > error_reporting(55);
> >
> > Or better yet, keep as you're doing and develop with E_ALL
> > and fix those E_NOTICE errors correctly! ;)
> >
> > Regards,
> > Philip Olson
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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

Reply via email to