Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19150 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96687 invoked by uid 1010); 24 Sep 2005 18:34:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 96672 invoked from network); 24 Sep 2005 18:34:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2005 18:34:57 -0000 X-Host-Fingerprint: 212.112.226.205 mail.nohn.net Linux 2.4/2.6 Received: from ([212.112.226.205:33577] helo=mail.nohn.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id AE/4A-24510-05C95334 for ; Sat, 24 Sep 2005 14:34:56 -0400 Received: by mail.nohn.net (Postfix, from userid 1010) id 3915B37C465; Sat, 24 Sep 2005 20:34:50 +0200 (CEST) Received: from [192.168.2.101] (dsl-082-083-245-040.arcor-ip.net [82.83.245.40]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.nohn.net (Postfix) with ESMTP id B6E8937C45A; Sat, 24 Sep 2005 20:34:46 +0200 (CEST) Message-ID: <43357E36.4060706@nohn.net> Date: Sat, 24 Sep 2005 18:26:30 +0200 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sara Golemon Cc: internals@lists.php.net References: <431ACE6C.3060006@php.net> <73.1B.33268.806DA134@pb1.pair.com> <009901c5b165$3df9ee10$6c051fac@lighthammer> In-Reply-To: <009901c5b165$3df9ee10$6c051fac@lighthammer> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on mail.nohn.net X-Spam-Status: No, hits=-103.1 required=5.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL,USER_IN_WHITELIST autolearn=no version=2.64 X-Spam-Level: Subject: Re: [PHP-DEV] Re: E_NOTICE/E_STRICT/E_WARNING thrown on bad arrays initialization? From: sebastian@nohn.net (Sebastian Nohn) Sara Golemon wrote: >>> 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. No reason to not bring it up again. Sebastian