php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53258 ReflectionClass/getMethods/getDocComment returns nothing
Submitted: 2010-11-08 01:10 UTC Modified: 2010-11-09 01:07 UTC
From: spamtray at gmail dot com Assigned:
Status: Not a bug Package: Reflection related
PHP Version: 5.3.3 OS: Fedora 13
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: spamtray at gmail dot com
New email:
PHP Version: OS:

 

 [2010-11-08 01:10 UTC] spamtray at gmail dot com
Description:
------------
ReflectionClass/getMethods/getDocComment returns nothing under php 5.3.3, works fine in 5.2.10

class Service
{
    /**
     * Retrieve all info about partner
     *
     * @action get
     * @param int $partnerId
     * @return Partner
     */
    public function getAction($partnerId)
    {

    }

    /**
     * @action getUsage
     * @param PartnerFilter $filter
     */
    public function getUsageAction($filter)
    {

    }
}

Test script:
---------------
$rc = new ReflectionClass('Service');
$methods = $rc->getMethods(ReflectionMethod::IS_PUBLIC);

foreach ($methods as $method) {
    echo '<pre>';
    $docComment = $method->getDocComment();
    print_r($docComment);
    echo '</pre>';
}

Expected result:
----------------
/**
* Retrieve all info about partner
*
* @action get
* @param int $partnerId
* @return Partner
*/

/**
* @action getUsage
* @param PartnerFilter $filter
*/

Actual result:
--------------
NOTHING

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-08 01:35 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2010-11-08 01:35 UTC] felipe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

I can't reproduce this.
 [2010-11-08 22:57 UTC] spamtray at gmail dot com
You where correct Felipe. My problem wasnt PHP but the eaccelerator like described here:
http://eaccelerator.net/ticket/229

Tnankyou guys
 [2010-11-09 01:07 UTC] felipe@php.net
-Status: Feedback +Status: Bogus
 [2010-11-09 01:07 UTC] felipe@php.net
;)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC