1--TEST-- 2Traits with late static bindings. 3--CREDITS-- 4Simas Toleikis simast@gmail.com 5--FILE-- 6<?php 7 8 trait TestTrait { 9 public static function test() { 10 return static::$test; 11 } 12 } 13 14 class A { 15 use TestTrait; 16 protected static $test = "Test A"; 17 } 18 19 class B extends A { 20 protected static $test = "Test B"; 21 } 22 23 echo B::test(); 24 25?> 26--EXPECT-- 27Test B 28