[php-src] Issue #8243: Allow to show_source and highlight_file method to highlight a specific line with a different pattern

From: Date: Wed, 23 Mar 2022 22:05:35 +0000
Subject: [php-src] Issue #8243: Allow to show_source and highlight_file method to highlight a specific line with a different pattern
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240470@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8243 Comment Author: damianwadley Sounds a bit more complicated than what highlight_file and highlight_string were intended to do: be cheap and easy solutions to highlight PHP source. In fact they're already awkward to use because of their reliance on INI settings instead of accepting configuration through a parameter (such as you're suggesting for the line highlighting), and how rudimentary the highlighting is. I personally have rarely seen them used in any serious capacity because there are various libraries out there that can do the same job, for multiple languages, with additional features. Have you considered that your error page would benefit from a real highlighter? Laravel is a [reasonable example](https://i.stack.imgur.com/YDQcV.png) of presenting exactly the same sort of error page that you're looking to create, although unfortunately it looks like [the library they use](https://github.com/facade/ignition) is specifically designed for Laravel only.

« previous php.bugs (#240470) next »