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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pygments/pygments

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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 today

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 47% 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

4284d 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

282.7M13](/packages/vrana-jush)[easybook/geshi

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

221.1M10](/packages/easybook-geshi)[skywarth/chaotic-schedule

Randomize scheduled command execution time and date intervals

12263.8k](/packages/skywarth-chaotic-schedule)[spatie/sidecar-shiki

Run Shiki highlighting with Sidecar

3710.2k](/packages/spatie-sidecar-shiki)[ruafozy/mersenne-twister

Pure-PHP Mersenne Twister

221.5M13](/packages/ruafozy-mersenne-twister)[luminous/luminous

A full featured syntax highlighting library.

521.9k2](/packages/luminous-luminous)

PHPackages © 2026

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