mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
26 lines
404 B
PHP
26 lines
404 B
PHP
--TEST--
|
|
Semantic of alias operation is to provide an additional identifier for the
|
|
method body of the original method.
|
|
It should also work in case the method is fully qualified.
|
|
--FILE--
|
|
<?php
|
|
error_reporting(E_ALL);
|
|
|
|
trait THello {
|
|
public function a() {
|
|
echo 'A';
|
|
}
|
|
}
|
|
|
|
class TraitsTest {
|
|
use THello { THello::a as b; }
|
|
}
|
|
|
|
$test = new TraitsTest();
|
|
$test->a();
|
|
$test->b();
|
|
|
|
?>
|
|
--EXPECT--
|
|
AA
|