mirror of
https://github.com/php/php-src.git
synced 2024-10-17 06:22:53 +00:00
23 lines
335 B
Plaintext
23 lines
335 B
Plaintext
|
--TEST--
|
||
|
Semantic of alias operation is to provide an additional identifier for the method body of the original method.
|
||
|
--FILE--
|
||
|
<?php
|
||
|
error_reporting(E_ALL);
|
||
|
|
||
|
trait THello {
|
||
|
public function a() {
|
||
|
echo 'A';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class TraitsTest {
|
||
|
use THello { a as b; }
|
||
|
}
|
||
|
|
||
|
$test = new TraitsTest();
|
||
|
$test->a();
|
||
|
$test->b();
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
AA
|