Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47769 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65526 invoked from network); 3 Apr 2010 14:33:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Apr 2010 14:33:13 -0000 Authentication-Results: pb1.pair.com header.from=ralph@smashlabs.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ralph@smashlabs.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain smashlabs.com from 67.15.58.61 cause and error) X-PHP-List-Original-Sender: ralph@smashlabs.com X-Host-Fingerprint: 67.15.58.61 openrce.org Linux 2.6 Received: from [67.15.58.61] ([67.15.58.61:51055] helo=users.smashlabs.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/13-41826-8A157BB4 for ; Sat, 03 Apr 2010 09:33:12 -0500 Received: (qmail 8588 invoked from network); 3 Apr 2010 09:33:03 -0500 Received: from unknown (HELO ralph-macbook.local) (64.134.186.64) by smashlabs.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 3 Apr 2010 09:33:03 -0500 Message-ID: <4BB7519F.6070900@smashlabs.com> Date: Sat, 03 Apr 2010 09:33:03 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: Stanislav Malyshev CC: internals References: <4BB4EC2F.1020502@smashlabs.com> <4BB65BDE.2040302@zend.com> In-Reply-To: <4BB65BDE.2040302@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] On constructors: BC Break and Class compiler Improvements From: ralph@smashlabs.com (Ralph Schindler) Stanislav Malyshev wrote: > Hi! > >> class Filter { >> public function __construct() { /* construct stuff */ } >> public function filter($value) { /* return filtered */ } >> } >> >> Produces: >> >> PHP Strict Standards: Redefining already defined constructor for >> class Zend\Filter\Filter in [snip file] on line [snip line] > > I just checked - this code produces the same warning in 5.2 (without the > namespace of course), and in 5.3.0. So I don't see what changed in 5.3.1 > exactly? Nothing changed, you are right, the behavior is there in all these versions. My PHP's for 5.3.0 and 5.3.1&2 have different default values for error_reporting, and since changing to E_STRICT at runtime is too late (file already compiled with error_reporting of php.ini), I was not triggering the code properly. (My 5.3.0 was shipped from apple, as was their php.ini which the default error_reporting value is E_ALL & ~E_NOTICE & ~E_DEPRECATED, not the newly recommended php.ini-development value of E_ALL | E_STRICT. Also, in 5.2 series, the PHP group never recommended to use E_STRICT in the php.ini, another reason the code was not triggered in my testing.) -ralph