ID:               30961
 User updated by:  michiel at trendserver dot nl
 Reported By:      michiel at trendserver dot nl
 Status:           Open
 Bug Type:         Zend Engine 2 problem
 Operating System: Debian
 PHP Version:      5.0.2
 New Comment:

Also occurs on http://snaps.php.net/win32/php5-win32-200412090730.zip


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

[2004-12-02 14:27:21] michiel at trendserver dot nl

Description:
------------
The Reflection API has a (minor) bug regarding the getStartLine()
function in ReflectionClass. When the reflected class is not a subclass
and does not implement any interfaces, the result of getStartLine() is
one line off.

Reproduce code:
---------------
<?
    class a
    {
    }

    class b extends a
    {
    }

    $ref1 = new ReflectionClass('a');
    $ref2 = new ReflectionClass('b');
    echo $ref1->getStartLine() . "\n";
    echo $ref2->getStartLine() . "\n";
?>

Expected result:
----------------
2
6

Actual result:
--------------
3
6


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


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

Reply via email to