<?php trait T1 { public function m(){ echo "t1 trait"; } } trait T2 { public function n(){ echo "t2 trait"; } } class Test { use T1, T2; public function __construct() { var_dump((new ReflectionClass($this))->getTraitNames()); } } $t = new Test();
You have javascript disabled. You will not be able to edit any code.