Bug #62303 [Opn->Fbk]: ReflectionClass, getMethods(), getName() empty
| From: | sixd@php.net | Date: | Tue, 12 Jun 2012 23:56:47 +0000 |
| Subject: | Bug #62303 [Opn->Fbk]: ReflectionClass, getMethods(), getName() empty | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-171225@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62303&edit=1
ID: 62303
Updated by: sixd@php.net
Reported by: v at roxori dot com
Summary: ReflectionClass, getMethods(), getName() empty
-Status: Open
+Status: Feedback
Type: Bug
Package: Reflection related
Operating System: FreeBSD9
PHP Version: 5.4.3
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2012-06-12 22:51:40] nikic@php.net
I can't reproduce this: http://3v4l.org/6cvK8#v500
Seems to behave the same on all versions, with no change in between.
Maybe this is OS specific (or specific to something else in your env).
------------------------------------------------------------------------
[2012-06-12 21:01:45] v at roxori dot com
Description:
------------
After upgrading PHP to 5.4.3 no longer return the name of the method.
Correspondingly, the library stopped working, namely Zend. Now the issue Fatal
error: Uncaught exception 'Zend_Amf_Server_Exception' with message 'Duplicate
method registered: Having sorted out, I realized that the code does not return the
name of the method. In PHP 5.3 all was ok.
---
From manual page: http://www.php.net/reflectionclass.getname#refsect1-
reflectionclass.getname-description
---
Test script:
---------------
class Foo {
function first(){
}
function second(){
}
}
$foo = new Foo();
$reflect = new ReflectionClass($foo);
$props = $reflect->getMethods();
foreach ($props as $prop) {
print $prop->getName() . "\n";
}
Expected result:
----------------
first
second
Actual result:
--------------
(empty)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62303&edit=1