On 30/04/2016 23:14, Stanislav Malyshev wrote:
$def instanceof MyAnnotation; //TRUE
That looks fine, however the problem is that if MyAnnotation is a class,
then PHP does not have multiple inheritance, so it's the only class it
can be. And given that your class has no methods, $def has no methods
either and can not have any semantics besides simple data object.
What would prevent the class from having methods?
class MyAnnotation
{
public $foo;
public $bar;
public function doStuff() { ... }
}
I don't see any more need for multiple inheritance here than in any
other class definition.
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php