ID:               47019
 User updated by:  daniel dot gorski at develnet dot org
 Reported By:      daniel dot gorski at develnet dot org
 Status:           Open
-Bug Type:         Class/Object related
+Bug Type:         Reflection related
 Operating System: Linux
 PHP Version:      5.3CVS-2009-01-06 (CVS)
 New Comment:

Changed category to "Reflection related".

g.


Previous Comments:
------------------------------------------------------------------------

[2009-01-06 11:49:57] daniel dot gorski at develnet dot org

Description:
------------
The \ReflectionParameter->getClass()->getName() method returns a wrong
value. It omits the leading namespace slash.

Reproduce code:
---------------
namespace A\B\C;
class Bar {}

namespace D;
class Foo { function foo(\A\B\C\Bar $x) {} }

$rm = new \ReflectionMethod('\D\Foo', 'foo');
$rp = $rm->getParameters();

echo $rp[0]->getClass()->getName();

Expected result:
----------------
\A\B\C\Bar

Actual result:
--------------
A\B\C\Bar


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47019&edit=1

Reply via email to