Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16759 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49457 invoked by uid 1010); 16 Jun 2005 17:54:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49442 invoked from network); 16 Jun 2005 17:54:47 -0000 Received: from unknown (HELO gmail.com) (127.0.0.1) by localhost with SMTP; 16 Jun 2005 17:54:47 -0000 X-Host-Fingerprint: 64.233.170.207 rproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.170.207:43597] helo=rproxy.gmail.com) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id CB/42-20931-7ECB1B24 for ; Thu, 16 Jun 2005 13:54:47 -0400 Received: by rproxy.gmail.com with SMTP id c51so174079rne for ; Thu, 16 Jun 2005 10:54:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eMh7R12TIprx/8OPyNtZb3W5xqU4ObSJrJt3eafdeNq1oUx7cUNMnpNnNktdtX5l+DjTn8K6k5+twfKV7+fa1CRSJpLyTcCoKSoY15BdqcMlq2xjKACGNX2UdyeC2HeVsUvNZLNixwzzsicqOKAi15dP19MIcmgMHb8AEkxdzQc= Received: by 10.38.66.4 with SMTP id o4mr689840rna; Thu, 16 Jun 2005 10:54:44 -0700 (PDT) Received: by 10.38.65.11 with HTTP; Thu, 16 Jun 2005 10:54:44 -0700 (PDT) Message-ID: Date: Thu, 16 Jun 2005 13:54:44 -0400 Reply-To: Dan Scott To: Zeev Suraski Cc: boots , internals@lists.php.net In-Reply-To: <5.1.0.14.2.20050616204052.05b410e0@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050616163021.80366.qmail@web50807.mail.yahoo.com> <5.1.0.14.2.20050616195027.0366c130@localhost> <5.1.0.14.2.20050616204052.05b410e0@localhost> Subject: Re: [PHP-DEV] In regards to E_STRICT and PHP5 From: denials@gmail.com (Dan Scott) On 6/16/05, Zeev Suraski wrote: > At 20:39 16/06/2005, Dan Scott wrote: > >On 6/16/05, Zeev Suraski wrote: > > > Why would you enable it then? You have to very explicitly enable it,= as > > > it's off by default, and doesn't get enabled even if you switch to E_= ALL. > > > >Well, that depends on your definition of "default"; >=20 > I meant what PHP comes with built-in / php.ini-dist. >=20 > >php.ini-recommended in HEAD shows: > > > >; - Show all errors, including coding standards warnings > >; > >error_reporting =3D E_ALL | E_STRICT > > > >-- so the user who does 'cp php.ini-recommended /etc/php.ini' is, in > >fact, getting E_STRICT by default with the recommended configuration. > > > >Perhaps E_ALL should be the default in php.ini-recommended, with E_ALL > >| E_STRICT a documented (but commented) option. >=20 > Maybe we should be a bit more clear with what we say there. >=20 > Zeev >=20 To be fair, INSTALL does say: If you instead choose php.ini-recommended, be certain to read the list of changes within, as they affect how PHP behaves. but php.ini-recommended, in the list of changes vs. php.ini-dist, says: ; - error_reporting =3D E_ALL [Code Cleanliness, Security(?)] ; By default, PHP surpresses errors of type E_NOTICE. These error mess= ages ; are emitted for non-critical errors, but that could be a symptom of a bigger ; problem. Most notably, this will cause error messages about the use ; of uninitialized variables to be displayed. -- so yes, we need to update this section to note the addition of E_STRICT and the deprecation warnings to the list. Suggested patch: --- php.ini-recommended 2005-06-01 23:27:16.000000000 -0400 +++ php.ini-new 2005-06-16 14:09:01.803325720 -0400 @@ -111,11 +111,12 @@ ; - variables_order =3D "GPCS" [Performance] ; The environment variables are not hashed into the $_ENV. To access ; environment variables, you can use getenv() instead. -; - error_reporting =3D E_ALL [Code Cleanliness, Security(?)] -; By default, PHP surpresses errors of type E_NOTICE. These error mes= sages +; - error_reporting =3D E_ALL | E_STRICT [Code Cleanliness, Security= (?)] +; By default, PHP suppresses errors of type E_NOTICE. These error mes= sages ; are emitted for non-critical errors, but that could be a symptom of a bigger ; problem. Most notably, this will cause error messages about the use -; of uninitialized variables to be displayed. +; of uninitialized variables to be displayed. Adding E_STRICT will cau= se +; deprecation warnings for functions like dl() to be displayed. ; - allow_call_time_pass_reference =3D Off [Code cleanliness] ; It's not possible to decide to force a variable to be passed by refe= rence ; when calling a function. The PHP 4 style to do this is by making th= e Dan