|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67099 a problem about ReflectionClass,please reply is it a bug
Submitted: 2014-04-20 15:51 UTC Modified: 2014-12-30 10:42 UTC
From: huqinlou0123 at 163 dot com Assigned:
Status: No Feedback Package: Reflection related
PHP Version: 5.4Git-2014-04-20 (Git) OS: win7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: huqinlou0123 at 163 dot com
New email:
PHP Version: OS:


 [2014-04-20 15:51 UTC] huqinlou0123 at 163 dot com
From manual page:
		$rClass = new \ReflectionClass('CommonController');
		//$a=new CommonController;
		//$rClass = new \ReflectionClass($a);
		$methodList = $rClass->getMethods();
this will not exit;and will display,and no error report;

		//$rClass = new \ReflectionClass('CommonController');
		$a=new CommonController;
		$rClass = new \ReflectionClass($a);
		$methodList = $rClass->getMethods();
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;
		$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();

Expected result:
it can't run the way on my writed code;

Actual result:
all in above;


IndexController.class.txt (last revision 2014-04-20 15:53 UTC by huqinlou0123 at 163 dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-20 21:31 UTC]
-Status: Open +Status: Feedback -Package: *General Issues +Package: Reflection related
 [2014-04-20 21:31 UTC]
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.


class CommonController { }

$rClass = new \ReflectionClass('CommonController');
//$a=new CommonController;
//$rClass = new \ReflectionClass($a);
$methodList = $rClass->getMethods();


Works for me.
 [2014-12-30 10:42 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Mar 26 00:03:53 2023 UTC