diff options
Diffstat (limited to 'Zend/tests/traits/static_002.phpt')
-rw-r--r-- | Zend/tests/traits/static_002.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/tests/traits/static_002.phpt b/Zend/tests/traits/static_002.phpt new file mode 100644 index 0000000..c076085 --- /dev/null +++ b/Zend/tests/traits/static_002.phpt @@ -0,0 +1,23 @@ +--TEST--
+Traits with static methods referenced using variable.
+--CREDITS--
+Simas Toleikis simast@gmail.com
+--FILE--
+<?php
+
+ trait TestTrait {
+ public static function test() {
+ return 'Test';
+ }
+ }
+
+ class A {
+ use TestTrait;
+ }
+
+ $class = "A";
+ echo $class::test();
+
+?>
+--EXPECT--
+Test
\ No newline at end of file |