PHP Classes

PHP color: Format PHP code as colored HTML

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2008-08-01 (9 years ago) RSS 2.0 feedStarStarStar 59%Total: 856 All time: 3,958 This week: 579Up
Version License PHP version Categories
phpcolor 1.0Freeware5.0HTML, PHP 5, Text processing
Description Author

This class can be used to format PHP code as colored HTML independent of the PHP code version.

It takes a string of PHP code and reformats it by adding HTML tags that can render the PHP constructs using different colors.

The PHP code text reformatting uses only regular expression replacement.

Innovation Award
PHP Programming Innovation award nominee
August 2008
Number 2

Prize: One book of choice from Manning
PHP provides built-in support to display PHP code with highlighted syntax.

However, if you want to highlight code for PHP 5 or later using PHP 4, it may not work, as the highlighting functions may fail because PHP 5 syntax is invalid under PHP 4.

This class provides an alternative solution based on replacing code with syntax highlighting tags using PHP version independent regular expressions.

Manuel Lemos
Name: hazem ali <contact>
Classes: 1 package by
Country: Egypt Egypt
Age: 33
All time rank: 245123 in Egypt Egypt
Week rank: 1069 Up19 in Egypt Egypt Up
Innovation award
Innovation award
Nominee: 1x

  • screenshot
  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example test
Plain text file phpcolor.php Class class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:3,958
This week:579Up
User Ratings User Comments (2)
 All time