PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/good/ext/reflection/tests/bug64239.php

http://github.com/facebook/hiphop-php
PHP | 18 lines | 17 code | 1 blank | 0 comment | 0 complexity | f858eec654552b06890be8c5e61797c1 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. <?hh
  2. class A {
  3. use T2 { t2method as Bmethod; }
  4. }
  5. trait T2 {
  6. public function t2method() {
  7. }
  8. }
  9. class B extends A{
  10. }
  11. <<__EntryPoint>> function main(): void {
  12. $obj = new ReflectionClass("B");
  13. print_r($obj->getMethods());
  14. print_r(($method = $obj->getMethod("Bmethod")));
  15. var_dump($method->getName());
  16. var_dump($method->getShortName());
  17. }