Re: [RFC] Allow ::class on objects

From: Date: Thu, 09 Jan 2020 20:29:41 +0000
Subject: Re: [RFC] Allow ::class on objects
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-108072@lists.php.net to get a copy of this message
Along those lines, is there any consideration of adding ::interface and ::trait, where applicable?
How would this be applicable? In the context of variables, an object can be only of a single class type, whereas it can be an *instanceof* multiple interfaces (or an extension of other types) or be *composed of* multiple traits (in full or partial if there are trait conflicts.) How would you get the right semantics out of $object::interface, or $object::trait, and/or do you have an example of what you're expecting? -ralph

« previous php.internals (#108072) next »