Re: Undefined Variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry for the top post!

I don't know numbers, but my gut instinct is that the cycles wasted raising the notice (it gets raised even if it goes nowhere so turning display and log doesn't remove the hit completely) are better spent executing defensive code.

There is no reason, ever, that production code should raise notices about which you don't care. If PHP is telling you something might be wrong, something might be wrong! And if you're investigating the code already, figure out what's happening and deal with it properly.

Only lazy and/or developers ignore notices. If you're one of them and this statement offends you, you probably know it's right!

-Stuart

-- 
Sent from my leaf blower

On 14 Feb 2013, at 18:04, Roman Gelfand <rgelfand2@xxxxxxxxx> wrote:

> Is there a performance hit when a variable is undefined? or, perhaps,
> aside from the obvious uncontrolled conditions, are there other
> impacts?
> 
> Thanks in advance
> 
> -- 
> 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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux