Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18668 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72329 invoked by uid 1010); 4 Sep 2005 15:28:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 72312 invoked from network); 4 Sep 2005 15:28:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2005 15:28:07 -0000 X-Host-Fingerprint: 69.12.155.130 69-12-155-130.dsl.static.sonic.net Linux 2.4/2.6 Received: from ([69.12.155.130:1783] helo=pigeon.alphaweb.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id A3/2E-33268-6821B134 for ; Sun, 04 Sep 2005 11:28:06 -0400 Received: from localhost ([127.0.0.1] helo=lighthammer) by pigeon.alphaweb.net with smtp (Exim 4.10) id 1EBvlQ-0007q1-00 for internals@lists.php.net; Sun, 04 Sep 2005 07:46:32 -0700 Message-ID: <009901c5b165$3df9ee10$6c051fac@lighthammer> To: References: <431ACE6C.3060006@php.net> <73.1B.33268.806DA134@pb1.pair.com> Date: Sun, 4 Sep 2005 08:27:43 -0700 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: E_NOTICE/E_STRICT/E_WARNING thrown on bad arrays initialization? From: pollita@php.net ("Sara Golemon") >> As you surely know, arrays are often badly initialized: >> >> > // $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