Re: [PHP-DEV] Method overload support

2021-04-27 Thread Ben Ramsey
> On Apr 25, 2021, at 15:12, David Rodrigues wrote: > > 3. Poorly typed functions or methods cannot be overloaded. > > function printId(User $user) { ... } > function printId($user) { ... } // Fatal error Since the second is the same as `mixed $user`, why couldn’t the engine pick the most spec

Re: [PHP-DEV] Method overload support

2021-04-25 Thread Matthew Brown
On Sun, 25 Apr 2021 at 16:12, David Rodrigues wrote: > I know that this discussion comes back from time to time, but now that PHP > is quite strong in relation to argument typing, I think it is worthwhile to > have a quick discussion about it. Maybe to PHP 9. > > One of the things I remember that