#30961 [Opn->Asn]: Wrong linenumber in ReflectionClass getStartLine()
ID: 30961
Updated by: tony2001@php.net
Reported By: michiel at trendserver dot nl
-Status: Open
+Status: Assigned
Bug Type: Zend Engine 2 problem
Operating System: *
PHP Version: 5CVS-2005-03-01
-Assigned To:
+Assigned To: helly
New Comment:
Assigning to the author.
Previous Comments:
------------------------------------------------------------------------
[2005-03-01 09:39:47] michiel at trendserver dot nl
No change, using either
http://snaps.php.net/win32/php5.0-win32-200503010130.zip
or
http://snaps.php.net/win32/php5-win32-200503010730.zip
(can not confirm using a *nix build at this time)
------------------------------------------------------------------------
[2005-02-28 21:20:15] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[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
Thread (7 messages)