[php-src] Issue #11391: Impl. `ReflectionFunctionAbstract::getStartColumn` (and getEndColumn)
| From: | mvorisek | Date: | Wed, 07 Jun 2023 12:01:38 +0000 |
| Subject: | [php-src] Issue #11391: Impl. `ReflectionFunctionAbstract::getStartColumn` (and getEndColumn) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244616@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11391
Author: mvorisek
### Description
Currently only line can be obtained by reflection.
AFAK this limitation is comming from AST as only line and no column is stored to save memory.
I cannot tell if storing file column is worth now/in 2023 for every AST node, but I would welcome
the column number to be stored for classes and functions to get able to get the column number via
reflection and locate the source code more precisely.
In our usecase, we use the reflection data to highlight a Closure in a file and with short closures,
more than one Closure can be present on 1 line with actual PSR-12 style, ie. currently a Closure
instance cannot be mapped to a code section.