Q. What will be the output?
Code:
trait A { public function say() { echo 'A'; } }
class B { use A; }
(new B())->say();
β
Correct Answer: (A)
A
Explanation: Trait method is used in class.