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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC