mirror of
https://github.com/php/php-src.git
synced 2024-10-16 22:12:33 +00:00
22 lines
300 B
Plaintext
22 lines
300 B
Plaintext
|
--TEST--
|
||
|
Traits with __callStatic magic method.
|
||
|
--CREDITS--
|
||
|
Simas Toleikis simast@gmail.com
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
trait TestTrait {
|
||
|
public static function __callStatic($name, $arguments) {
|
||
|
return $name;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class A {
|
||
|
use TestTrait;
|
||
|
}
|
||
|
|
||
|
echo A::Test();
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
Test
|