Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best server side syntax highlighting solution (in PHP)

Do you guys know a syntax highlighter capable of highlighting mixed PHP+HTML+CSS+JS code?

like:

<?php
 echo 'foo';
?>
<div> foo </div>
<style type="text/css">
  .foo {color: #3d3;}
</style>

I only know GeShi so far. It's pretty cool, but it only supports one language at a time.

like image 570
Alex Avatar asked Apr 02 '11 18:04

Alex


1 Answers

It's not PHP, but Pygments is awesome. And it is faster than GeShi, even used in PHP with the system()function.

like image 90
Artefact2 Avatar answered Oct 12 '22 22:10

Artefact2