/hphp/test/zend/bad/ext/reflection/tests/bug63399.php
PHP | 27 lines | 22 code | 5 blank | 0 comment | 0 complexity | 42a62e5ba347f3059e0a8edee40ff8c1 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?php
- trait Trait1 {
- public function run() {}
- public function say() {}
- }
- trait Trait2 {
- public function run() {}
- public function say() {}
- }
- class MyClass
- {
- use Trait1, Trait2 {
- Trait1::run as execute;
- Trait1::say insteadof Trait2;
- Trait2::run insteadof Trait1;
- Trait2::say as talk;
- }
- }
- $ref = new ReflectionClass('MyClass');
- print_r($ref->getTraitAliases());
- print_r($ref->getTraits());
- ?>