Re: [PHP-DEV] Warning for "confusable" types

This is only part of a thread. view whole thread
October 14, 2019 08:17 (Gert)
On that note, since traits aren't possible as a return type. Would it
be possible to determine that the given return type is a trait? In
that case a more specific error message could also be possible.
I don't know much of the internals, so i don't know if that is even
possible atm, but it would be a nice addition.

On Mon, 14 Oct 2019 at 09:53, Stanislav Malyshev <> wrote:
> > Hi! > > > I was about to give my +1 on the more generic approach, but type hints > > could also be interfaces and "instance of the class X" is not a good fit. > > We could use "class or interface" if that's important. > > -- > Stas Malyshev > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: >