Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25172 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54173 invoked by uid 1010); 3 Aug 2006 09:05:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 54158 invoked from network); 3 Aug 2006 09:05:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2006 09:05:32 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; domainkeys=good DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 64.233.166.180 py-out-1112.google.com Linux 2.4/2.6 Received: from ([64.233.166.180:46098] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id E6/A2-44390-B5CB1D44 for ; Thu, 03 Aug 2006 05:05:31 -0400 Received: by py-out-1112.google.com with SMTP id n25so1962871pyg for ; Thu, 03 Aug 2006 02:05:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.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=B7kgJYt0JVSvXZPVBAf2TDW96ko+VsN56Pxi7EtBfqPJcHDkJtjNVzhc8liUPx8v/W0uExZIdBa/7BdqCw5yWTJMeVKh9wWDBPUZGB5+x53MCtoY3T1PrVB/zIjgEvgWfxPP2BIyVyQJpeqwHLliULtM5FHre6CD8JbgUxTGlFM= Received: by 10.35.60.16 with SMTP id n16mr3030145pyk; Thu, 03 Aug 2006 02:05:29 -0700 (PDT) Received: by 10.35.93.18 with HTTP; Thu, 3 Aug 2006 02:05:29 -0700 (PDT) Message-ID: <10845a340608030205rd012a71g30a97a3f4d2f7bc8@mail.gmail.com> Date: Thu, 3 Aug 2006 10:05:29 +0100 Reply-To: RQuadling@GoogleMail.com To: "Derick Rethans" Cc: "Lukas Smith" , "PHP Developers Mailing List" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44D0DB82.1070307@lerdorf.com> <7.0.1.0.2.20060803104541.0853b1e0@zend.com> <20060803095558.49c4e484@pierre-u64> <44D1B055.5070905@php.net> <44D1B505.1010300@php.net> Subject: Re: [PHP-DEV] RfC: rethink OO inheritance strictness From: rquadling@googlemail.com ("Richard Quadling") On 03/08/06, Derick Rethans wrote: > > Err? Code that already works, still works if we make the loose mode the > > default. Anyone who writes new classes can make use of a new strict flag > > however. > > Sure, but then that code won't run on older versions of PHP (5.1 f.e.) > anymore, so it is not a good solution. Currently, if E_STRICT is enabled, you get an E_STRICT non-fatal notice. Disabling E_STRICT (as you want to NOT be strict with the code) gives no warning. So, either userland code is STRICT (in PHP's terms - not C++/Delphi/Java) and no overloading is allowed and if you try you get the compile notice OR it is NOT strict and you can overload and get no notice. Toggling E_STRICT has no effect at runtime (for this issue) as the error is raised at compile time. So, is this problem solved? Very simply, if you want to overload parameters, don't use E_STRICT. The issue this brings is toggling E_STRICT on and off at RUNTIME required? (I suspect that would be a LOT of work). -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"