[PHP-DEV] Re: Signature compatibility: Number of arguments

2013-09-18 Thread Nikita Popov
On Thu, Aug 29, 2013 at 11:33 AM, Nikita Popov nikita@gmail.com wrote: Hi internals! This is a spinoff from the variadics thread. Quoting Stas: I also think this: public function query($query, ...$params) public function query(...$params) should be legal too. This is a

[PHP-DEV] Re: Signature compatibility: Number of arguments

2013-08-29 Thread Nikita Popov
On Thu, Aug 29, 2013 at 11:33 AM, Nikita Popov nikita@gmail.com wrote: This is a general issue in PHP that we might want to fix: Currently a method A is not compatible with a method B if A has less arguments than B. E.g. both of the following are incompatible signatures: public

Re: [PHP-DEV] Re: Signature compatibility: Number of arguments

2013-08-29 Thread Levi Morrison
I think of the following definition: function foo($bar = NULL) To really be two definitions with method overloading: function foo() function foo($bar) Allowing an inheritor/implementor to choose to not implement the second signature does not seem logical at all when you think of them this