2022-04-30 21:27:42 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class A {
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $var;
|
|
|
|
}
|
|
|
|
|
|
|
|
class B extends A {
|
|
|
|
/**
|
|
|
|
* @inheritDoc
|
|
|
|
*/
|
|
|
|
protected $var;
|
|
|
|
}
|
|
|
|
|
|
|
|
class C extends A {
|
|
|
|
/**
|
|
|
|
* No inherit
|
|
|
|
*/
|
|
|
|
protected $var;
|
|
|
|
}
|
2022-05-17 13:44:01 +02:00
|
|
|
|
|
|
|
class D extends a {
|
|
|
|
protected $var;
|
|
|
|
}
|
2023-02-10 15:37:30 +01:00
|
|
|
|
|
|
|
#[\Attribute(\Attribute::TARGET_PROPERTY)]
|
|
|
|
final class OwnAttribute
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class E extends A {
|
|
|
|
/**
|
|
|
|
* @var A
|
|
|
|
*/
|
|
|
|
#[\OwnAttribute]
|
|
|
|
protected $myVar;
|
|
|
|
}
|