On Tue, Nov 12, 2024, at 14:53, Gina P. Banyard wrote: > Hello internals, > > Ondřej Mirtes (author of PHPStan) remarked to me in August that Closure is > not a subtype of callable. > The implementation of this is quite straight forward and can be seen on > GitHub. [1] > The question is if there are any concern or not and if this requires an RFC > or can just be merged as is. > > Best regards, > > Gina P. Banyard > > [1] https://github.com/php/php-src/pull/15492 > Hey Gina,
I think saying “Closure should be a subtype of callable” would require an RFC. To say that “Closure should satisfy the callable type check” is just an oversight/bug. They are functionally the same IMO, just different perspectives. — Rob