Re: E_NOTICE/E_STRICT/E_WARNING thrown on bad arrays initialization?

From: Date: Sun, 04 Sep 2005 15:27:43 +0000
Subject: Re: E_NOTICE/E_STRICT/E_WARNING thrown on bad arrays initialization?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-18668@lists.php.net to get a copy of this message
As you surely know, arrays are often badly initialized: <?php // $array is undefined $array['index'] = 'value'; ?> Wouldn't it be such a good thing to let the programmers know that this is a bad habit, by throwing a +/- pedantic error ? I'm not sure which type would suit for it, but I think its important enough to throw a E_NOTICE.
I agree. I've always found it weird that no notice is thrown in this situation. Still I discourage people to code like this. This was brought up about a year ago and dismissed.
-Sara

« previous php.internals (#18668) next »