<?php trait T1 { function a1() { return $this->var; } } trait T2 { use T1; function a2() { return $this->a1(); } } class A { use T2; protected $var = 3; } $a = new A; echo $a->a2();
You have javascript disabled. You will not be able to edit any code.