php.net |  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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: crystality at mail dot ru
New email:
PHP Version: OS:

 

 [2009-07-28 22:48 UTC] crystality at mail dot ru
Description:
------------
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 ... 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-28 22:51 UTC] crystality at mail dot ru
Since the php.net site bugged a bit, threw "Warning: Cannot modify header information - headers already sent by (output started at /home/Web/sites/php-bugs-web/include/auth.inc:30) 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-2019 The PHP Group
All rights reserved.
Last updated: Tue May 21 00:01:27 2019 UTC