Implement getStartColumn for reflection?

#3 · open · 1 comments

View on GitHub ↗

TysonAndre

https://bugs.php.net/search.php?cmd=display&search_for=+getstartcolumn&x=0&y=0 doesn't show anything. Maybe possible in php 7.3 Also include in AST structure? Including in php error messages may be useful (8.x?) https://bugs.php.net/bug.php?id=70024 Having this would improve phan's error messages - Another dev looked into this and determined this would impact parsing performance and so on too much to be viable, which is why this wasn't done

Comments

TysonAndre

Probably not happening soon - see HANDLE_NEWLINE in Zend/zend_language_scanner. It might be possible if the most recent newline's byte offset is tracked, and by subtracting the current offset from that, but I'm not sure how to access that.