Re: Declaration of Bar::__construct() must be compatible

From: Date: Fri, 27 Feb 2004 10:42:24 +0000
Subject: Re: Declaration of Bar::__construct() must be compatible
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-8207@lists.php.net to get a copy of this message
On Friday 27 February 2004 10:12, Andi Gutmans wrote: > What I suggest is the following: > a) Don't check signature for constructors. Okie ;) > b) By default, don't check signature for inheritance *if* we're not > inheriting from an abstract class. > If it is an abstract class we should > check the signature because it's a PHP 5 feature. Yeah, for abstract classes the checks are fine and there won't be any compliance problems. > c) Add a new INI option (zend.strict_inheritance_checks) which does check > signature for methods (except for constructor). I don't like new INI > options but I don't think there's any way out. Me neither, worse luck. But we should name the option something like zend.legacy_compat for other potential compliance problems like cloning. (At the time of writing i see Stephane Drouard made a similalar suggestion). This option needs to be set by default, but we should make clear that it won't be default for ever. > > Comments? (Please try to keep them short :) > > Andi cheers, Pat

« previous php.internals (#8207) next »