php-src/Zend/tests/traits/static_get_called_class.phpt
Stefan Marr 6ad5c889a1 Added tests to for static support of traits.
# This was not tested and documented yet.
# Updated documentation in the RFC http://wiki.php.net/rfc/horizontalreuse
2010-11-17 23:05:20 +00:00

24 lines
303 B
PHP

--TEST--
Traits and get_called_class().
--CREDITS--
Simas Toleikis simast@gmail.com
--FILE--
<?php
trait TestTrait {
public static function test() {
return get_called_class();
}
}
class A {
use TestTrait;
}
class B extends A { }
echo B::test();
?>
--EXPECT--
B