php-src/Zend/tests/traits/static_001.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

22 lines
265 B
PHP

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