Can anyone explain me what is better regarding performace in Php-Di?
Using annotations
or plain constructor params
?
Annotations = less chars to write but is it a good practice?
class A {
/**
* @Inject
* @var B
**/
private $b;
use() {
$this->b->method();
}
}
Vs:
class A {
/** @var B **/
private $b;
public function __constructor(B $b) {
$this->b=$b;
}
use() {
$this->b->method();
}
}