Hi!
I might come off rather crumudgeonly here, but these last few threads I've seen going across to silence notices have a common theme - "I wanna be a lazier coder."
Laziness is a virtue for a coder :) At least, when it goes to avoid unnecessary work - in this example, boilerplate code.
Which is fine - set the PHP error level to not show them.
This is not good enough - "not showed" errors are still generated and are quite expensive.
But don't ask the engine to be rewritten to encourage bad coding practices which failing to properly initialize variables is a prime example of. It's
The case we're dealing with is specifically about providing resolution for the case when the value is not initialized and the default value is provided. It is about making good code easier to write ("$foo[$bar] ?? $baz" instead of "isset($foo[$bar])?$foo[$bar]:$bar").
-- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php