# [patch] ReflectionProperty::getLinenumber

- Thread: https://externals.io/message/14590
- Original archive: https://news-web.php.net/php.internals/14590
- Started by Johannes Schlueter on 2005-02-03T19:49:08+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #14590 — Johannes Schlueter — 2005-02-03T19:49:08+00:00

URL: https://externals.io/message/14590#14590

Hi,

here's a patch which is lying around on my disk for quite a while: It adds a 
ReflectionProperty::getLinenumber()-Method to find the Linenumber where a 
property was defined. I wrote it while working on a little code-browser 
thing. This method corresponds to the already existing Reflection[Class|
Function|Method]::get[Start|End]Line() Methods.
As you can see I extended the zend_property_info structure to hold the
linenumber. If an extension registers a property using zend_declare_property
it is assumed that the property was defined at line 0.

johannes

The patch is also available at 
http://anonsvn.schlueters.de/svn/phpatches/HEAD/reflectionProperty_getLinenumber.diff
-- 
Johannes Schlüter                      schlueter@mayflower.de
Mayflower GmbH / ThinkPHP              Tel: 089 / 24 20 54 - 33
Sendlinger Str. 42a                    Fax: 089 / 24 20 54 - 29
80331 München                          http://www.mayflower.de
