How to check if a class uses a trait in PHP? : <p>Notice that a trait may use other traits, so the class may not be using that trait directly. And also the class may be inherited from a parent class who is the one uses the trait.</p>

<p>Is this a question that can be solved within several lines or I would have to do some loops?</p>
