Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26260 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61683 invoked by uid 1010); 25 Oct 2006 23:01:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61668 invoked from network); 25 Oct 2006 23:01:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Oct 2006 23:01:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.42 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.42 darkcity.gna.ch Linux 2.5 (sometimes 2.4) (4) Received: from [195.226.6.42] ([195.226.6.42:59126] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/F2-29903-2CCEF354 for ; Wed, 25 Oct 2006 19:01:25 -0400 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 864E1CF1DA; Thu, 26 Oct 2006 01:01:19 +0200 (CEST) Received: from unknown by localhost (amavisd-new, unix socket) id client-XXbBU70z; Thu, 26 Oct 2006 01:01:18 +0200 (CEST) Received: from [192.168.1.42] (217-162-171-242.dclient.hispeed.ch [217.162.171.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTP id C0E5FCEF8F; Thu, 26 Oct 2006 01:01:17 +0200 (CEST) Message-ID: <453FECBD.7080704@cschneid.com> Date: Thu, 26 Oct 2006 01:01:17 +0200 User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: ceo@l-i-e.com CC: internals@lists.php.net References: <1485570655.20061023210857@marcus-boerger.de> <453F7B0C.2020809@cschneid.com> <44394.208.195.234.246.1161816565.squirrel@www.l-i-e.com> In-Reply-To: <44394.208.195.234.246.1161816565.squirrel@www.l-i-e.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at gna.ch Subject: Re: [PHP-DEV] Re: [RFC] E_DEPRECATED From: cschneid@cschneid.com (Christian Schneider) Richard Lynch wrote: > On Wed, October 25, 2006 9:56 am, Christian Schneider wrote: >> Another idea (I haven't seen skimming through the replies): >> Move use of undefined variable, property and index from E_NOTICE to >> E_STRICT as it is a coding style question some people use to find >> typos. > > I'd be totally -1 on that... > > Using un-initialized variables will lead the newbie scripter into all > kinds of problems if you don't break that habit while they are > young... > > I think php.ini default should have E_NOTICE "on" and have said so > since version 4.x, maybe even 3.x Make E_STRICT on by default and you'd have the same "newbie-protection". But that's an independent question (default error reporting level). Uninitialized variables IMHO fall exactly into the same category as OO-non-strictness: Some people consider the comfort factor worth the added risk of not catching a typo. So it's not about having the feature of reporting uninitialized variables or not, it's just about what error level to assign to it. My two cents, - Chris