1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/traits/static_forward_static_call.phpt
2020-02-03 22:52:20 +01:00

29 lines
461 B
PHP

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