PageRenderTime 34ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/hphp/test/zend/bad/ext/reflection/tests/bug63399.php

http://github.com/facebook/hiphop-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
  1. <?php
  2. trait Trait1 {
  3. public function run() {}
  4. public function say() {}
  5. }
  6. trait Trait2 {
  7. public function run() {}
  8. public function say() {}
  9. }
  10. class MyClass
  11. {
  12. use Trait1, Trait2 {
  13. Trait1::run as execute;
  14. Trait1::say insteadof Trait2;
  15. Trait2::run insteadof Trait1;
  16. Trait2::say as talk;
  17. }
  18. }
  19. $ref = new ReflectionClass('MyClass');
  20. print_r($ref->getTraitAliases());
  21. print_r($ref->getTraits());
  22. ?>