1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00
Files
archived-php-src/Zend/tests/traits/bugs/alias-semantics.phpt
2020-02-03 22:52:20 +01:00

24 lines
337 B
PHP

--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();
?>
--EXPECT--
AA