Login   Register  
PHP Classes
elePHPant
Icontem

PHP color: Format PHP code as colored HTML

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (6 years ago) RSS 2.0 feedStarStarStarStar 60%Total: 842 All time: 3,812 This week: 1,585Up
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
Picture of hazem ali
Name: hazem ali <contact>
Classes: 1 package by
Country: Egypt Egypt
Age: 30
All time rank: 233819 in Egypt Egypt
Week rank: 1882 Up23 in Egypt Egypt Down
Innovation award
Innovation award
Nominee: 1x

Screenshots  
  • 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  
 0%Total:842All time:3,812
 This week:0This week:1,585Up
User Ratings User Comments (2)  
 All time
Utility:87%StarStarStarStarStar
Consistency:81%StarStarStarStarStar
Documentation:-
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:60%StarStarStarStar
Rank:845