|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49093 ReflectionFunction fails to work with functions in fully qualified namespaces
Submitted: 2009-07-28 22:48 UTC Modified: 2009-07-28 22:51 UTC
From: crystality at mail dot ru Assigned:
Status: Not a bug Package: Reflection related
PHP Version: 5.3.0 OS: Windows XP SP3
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: crystality at mail dot ru
New email:
PHP Version: OS:


 [2009-07-28 22:48 UTC] crystality at mail dot ru
Just about the same bug I've reported in #47593
This time ReflectionFunction fails to work with functions with fully qualified namespaces.

Reproduce code:
namespace ns;
function func(){}
//new \ReflectionFunction('ns\func'); //Works
new \ReflectionFunction('\ns\func'); //Throws exception

Expected result:
new ReflectionFunction object created

Actual result:
Fatal error: Uncaught exception 'ReflectionException' with message 'Function \ns\func() does not exist' in ... 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-28 22:51 UTC] crystality at mail dot ru
Since the site bugged a bit, threw "Warning: Cannot modify header information - headers already sent by (output started at /home/Web/sites/php-bugs-web/include/ in /home/Web/sites/php-bugs-web/report.php on line 195" and sent me my own bug-report, I've made this by mistake. Refer to 49092.)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 02:01:28 2024 UTC