mirror of
https://github.com/php/php-src.git
synced 2024-12-24 17:30:48 +08:00
27 lines
321 B
PHP
27 lines
321 B
PHP
--TEST--
|
|
Bug #55137 (Changing trait static method visibility)
|
|
--FILE--
|
|
<?php
|
|
|
|
trait A {
|
|
protected static function foo() { echo "abc\n"; }
|
|
private static function bar() { echo "def\n"; }
|
|
}
|
|
|
|
|
|
class B {
|
|
use A {
|
|
A::foo as public;
|
|
A::bar as public baz;
|
|
}
|
|
}
|
|
|
|
B::foo();
|
|
B::baz();
|
|
|
|
|
|
?>
|
|
--EXPECT--
|
|
abc
|
|
def
|