mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
22 lines
265 B
Plaintext
22 lines
265 B
Plaintext
|
--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
|