Bug #67099 [Opn->Fbk]: a problem about ReflectionClass,please reply is it a bug

From: Date: Sun, 20 Apr 2014 21:31:37 +0000
Subject: Bug #67099 [Opn->Fbk]: a problem about ReflectionClass,please reply is it a bug
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185347@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67099&edit=1 ID: 67099 Updated by: requinix@php.net Reported by: huqinlou0123 at 163 dot com Summary: a problem about ReflectionClass,please reply is it a bug -Status: Open +Status: Feedback Type: Bug -Package: *General Issues +Package: Reflection related Operating System: win7 PHP Version: 5.4Git-2014-04-20 (Git) Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. <?php class CommonController { } $rClass = new \ReflectionClass('CommonController'); //$a=new CommonController; //$rClass = new \ReflectionClass($a); $methodList = $rClass->getMethods(); var_dump($methodList); ?> Works for me. Previous Comments: ------------------------------------------------------------------------ [2014-04-20 15:51:25] huqinlou0123 at 163 dot com Description: ------------ --- From manual page: http://www.php.net/reflectionclass.construct --- <code> $rClass = new \ReflectionClass('CommonController'); //$a=new CommonController; //$rClass = new \ReflectionClass($a); $methodList = $rClass->getMethods(); dump($methodList); exit; $this->display(); </code> this will not exit;and will display,and no error report; <code> //$rClass = new \ReflectionClass('CommonController'); $a=new CommonController; $rClass = new \ReflectionClass($a); $methodList = $rClass->getMethods(); dump($methodList); exit; $this->display(); </code> this will exit,and dump right list; the CommonController has required;and no cache,I can't understand ,is my environment's problem? my english isn't good,please try do it; Test script: --------------- Public function index () { $paramParse = new \Org\Util\ParamParse; //$data=$paramParse->buildAll('D:/wamp/www/BS2/Application/Hunlian/Controller'); $list = array(); require_once 'D:\wamp\www\BS2\Application\Hunlian\Controller\CommonController.class.php'; $rClass = new \ReflectionClass('CommonController'); //$a=new CommonController; //$rClass = new \ReflectionClass($a); $methodList = $rClass->getMethods(); dump($methodList); exit; $this->display(); } Expected result: ---------------- it can't run the way on my writed code; Actual result: -------------- all in above; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67099&edit=1

« previous php.bugs (#185347) next »