Author: Manuel Lemos
Updated on: 2020-09-19
Posted on: 2020-09-19
Package: PHP Prettify
This package implements a better solution for displaying PHP code in Web pages.
It can highlight the code using colors, add line numbering, highlight specific lines or just part of the code of a script, and highlighting the code using themes configured using separate files in JSON format.
About the PHP Prettify Package
The package PHP Prettify is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.
The basic purpose is: Output colored PHP code highlighted using themes
Here follows in more detail what it does:
This package can output colored PHP code highlighted using themes.
It can take the name a file of PHP script and parses it to extract its structure.
The class returns a HTML string with the original PHP code formatted to highlight different aspects of the PHP syntax. The resulting output can:
- Include line numbers on the side of the code
- Have a specific line being highlighted in a different way
- Return only a part of the original code being highlighted, like for instance only a class definition
- Use a separate configuration file in JSON format to define output presentation themes for different versions of PHP like PHP 5 and PHP 7
Conclusion
The PHP Prettify can be downloaded from download page or be installed using the PHP Composer tool following instructions in the Composer install instructions page.
This package was considered notable for implementing its benefits in a way that is worth noticing.
Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.
If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package as well nice prizes.
One nice prize that many PHP developers want and you may like is the PHP elePHPant mascot plush.
You need to be a registered user or login to post a comment
1,563,876 PHP developers registered to the PHP Classes site.
Be One of Us!
Login Immediately with your account on:
Comments:
1. error in README.MD - David Sotomonte (2020-09-19 10:36)
function theme is not ok... - 0 replies
Read the whole comment and replies