Marcus Boerger wrote:
> the short form is, use interfaces. And the long form is read the upgrade
> file and find out to use interfaces :-)
I don't understand how interfaces are connected to my proposal, please
explain.
Personally I don't need the strict OO checks for matching parameter
lists at all, but as long as they are E_STRICT (or the like) I have no
problem with them being done. Nevertheless I would like to relax them
just a tiny little bit for signature changes not having an impact of
object compatibility.
That's why I posted two use cases where the checks IMHO go too far and
added a patch to change that.
Copy of my message:
>> In the discussion about parameter checking in 5.2 I proposed to relax
>> the checks a tiny little bit: Don't test static functions (e.g. useful
>> for factory methods) and allow adding default values to functions (the
>> object of the inherited class still accepts the same parameters as the
>> base class). A patch is attached.
>
>> Example:
>> class Base
>> {
>> static function factory($x) { }
>> function foo($x) { }
>> }
>
>> class Spezialized extends Base
>> {
>> static function factory() { } # Static method, e.g. factory method
>> function foo($x = null) { } # Default values for specialized class
>> }
- Chris
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php