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

 ID:                 53522
 Updated by:         fel...@php.net
 Reported by:        klederson at phpburn dot com
 Summary:            ReflectionMethod -> getDocComment Problem ( bad
                     results )
-Status:             Open
+Status:             Bogus
 Type:               Bug
-Package:            Reproducible crash
+Package:            Reflection related
 Operating System:   Mac OS 10.6.4
 PHP Version:        5.3SVN-2010-12-11 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

.


Previous Comments:
------------------------------------------------------------------------
[2010-12-11 23:20:09] klederson at phpburn dot com

Sorry maybe my mistake in Flagging it.



It does not crash, it only dont work, wrong category.



I'm running some testes using 5.3.4 in Mac OS and it seems to be fixed
so probably you guys already fixed it.



If something goes wrong again i will let you know.

------------------------------------------------------------------------
[2010-12-11 23:02:36] cataphr...@php.net

Also, so that we're clear: what happens he second, third, etc. time? Is
there a crash? If so, can you provide a backtrace? Or does it simply
work as if there was no comment?



Thanks.

------------------------------------------------------------------------
[2010-12-11 23:00:44] cataphr...@php.net

Are you using any kind of opcode cache?

------------------------------------------------------------------------
[2010-12-11 22:18:08] klederson at phpburn dot com

Description:
------------
---

>From manual page: http://www.php.net/class.reflectionmethod

---



Hi,



I'm trying to use ReflectionMethod::getDocComment() but i'm getting this
little issue, it ONLY brings the comment at first time you load it OR if
you change the main called file/class.



In Test Script examples, you can see it will only bring once the comment
from myMethod in Test Class.



Even if you run ReflectionTest.php many times ( from browser or shell )
it will bring it only once or again if you change and save Test.php ( or
equivalent ) file.

Test script:
---------------
Example (Test.php)

class Test {

        /**

         * Hi this is a comment

         */

        public function myMethod() {

                print "Hi";

        }

}



Example (ReflectionTest.php)

require_once('test.php');

$reflectionMethod = new ReflectionMethod('Test', 'myMethod');

echo $reflectionMethod->getDocComment();

Expected result:
----------------
Get Method Comments ( ReflectionMethod::getDocComment() )

Actual result:
--------------
Even if you run ReflectionTest.php many times ( from browser or shell )
it will bring it only once or again if you change and save Test.php ( or
equivalent ) file.


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



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

Reply via email to