From:             
Operating system: Mac OS 10.6.4
PHP version:      5.3SVN-2010-12-11 (snap)
Package:          Reproducible crash
Bug Type:         Bug
Bug description:ReflectionMethod -> getDocComment Problem ( bad results )

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 bug report at http://bugs.php.net/bug.php?id=53522&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53522&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53522&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53522&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53522&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53522&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53522&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53522&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53522&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53522&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53522&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53522&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53522&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53522&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53522&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53522&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53522&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53522&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53522&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53522&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53522&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53522&r=mysqlcfg

Reply via email to