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 function foo($bar)
>     public function foo()
>
>     public function foo($bar = NULL)
>     public function foo()
>
> This doesn't really make sense. Removing parameters doesn't violate LSP,
> because in PHP it is legal to pass more arguments than declared. (Only
> adding additional required parameters would violate LSP.)
>
> Is it okay to change this?
>
> Thanks,
> Nikita
>

Patch for this change: https://github.com/php/php-src/pull/424

Nikita

Reply via email to