PHPackages                             pygments/pygments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pygments/pygments

ActiveLibrary

pygments/pygments
=================

Syntax highlighter bridge for pygments

1.0.0(11y ago)02301MITPHPPHP &gt;=5.5.9

Since Oct 10Pushed 11y ago1 watchersCompare

[ Source](https://github.com/php-mod/pygments)[ Packagist](https://packagist.org/packages/pygments/pygments)[ Docs](https://github.com/php-mod/pygments)[ RSS](/packages/pygments-pygments/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

Pygments for PHP
================

[](#pygments-for-php)

PHP Server side syntax highlighter based on [Pygments](http://pygments.org/) highlighter software.

Installation:
-------------

[](#installation)

To use this plugin you need pygments in your server:

```
sudo apt-get python-pygments

```

That's all. Now you can download the plugin via Composer or as independent library and use it.

Usage
-----

[](#usage)

```
$code = file_get_contents("test.js");
echo Pygmentize::format($code, "js");
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4238d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8da2a4376a9b330628e63e6d5b11ab407c17549b955b65adc19ca49b914e5fae?d=identicon)[amouhzi](/maintainers/amouhzi)

---

Top Contributors

[![amouhzi](https://avatars.githubusercontent.com/u/4458806?v=4)](https://github.com/amouhzi "amouhzi (4 commits)")

---

Tags

highlighterSyntax highlighterpygments

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pygments-pygments/health.svg)

```
[![Health](https://phpackages.com/badges/pygments-pygments/health.svg)](https://phpackages.com/packages/pygments-pygments)
```

###  Alternatives

[vrana/jush

JUSH - JavaScript Syntax Highlighter

272.7M9](/packages/vrana-jush)[nicoswd/php-rule-parser

Rule Engine - Rule Parser &amp; Evaluator

13078.6k7](/packages/nicoswd-php-rule-parser)[easybook/geshi

GeSHi - Generic Syntax Highlighter. This is an unmodified port of GeSHi project code found on SourceForge.

211.0M10](/packages/easybook-geshi)[spatie/sidecar-shiki

Run Shiki highlighting with Sidecar

3610.2k](/packages/spatie-sidecar-shiki)[luminous/luminous

A full featured syntax highlighting library.

521.7k2](/packages/luminous-luminous)[ramsey/pygments

A PHP wrapper for Pygments, the Python syntax highlighter, forked from kzykhys/pygments.

103.0k3](/packages/ramsey-pygments)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
