PHPackages                             mjohnson/decoda - 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. [Search &amp; Filtering](/categories/search)
4. /
5. mjohnson/decoda

ActiveLibrary[Search &amp; Filtering](/categories/search)

mjohnson/decoda
===============

A lightweight lexical string parser for BBCode styled markup.

6.13.0(3y ago)1971.3M—0.9%50[4 issues](https://github.com/milesj/decoda/issues)[1 PRs](https://github.com/milesj/decoda/pulls)12MITPHPPHP &gt;=7.3.0

Since Jul 8Pushed 3y ago12 watchersCompare

[ Source](https://github.com/milesj/decoda)[ Packagist](https://packagist.org/packages/mjohnson/decoda)[ Docs](http://milesj.me/code/php/decoda)[ RSS](/packages/mjohnson-decoda/feed)WikiDiscussions master Synced 1mo ago

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

Decoda
======

[](#decoda)

[![Build Status](https://camo.githubusercontent.com/b03d1b3a50e58041ddd365e11ba32cb9a6e6c9ddf2b12d32cc6499c766378a86/68747470733a2f2f7472617669732d63692e6f72672f6d696c65736a2f6465636f64612e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/milesj/decoda)[![Minimum PHP Version](https://camo.githubusercontent.com/eed4d5cf01364b115489810f47ed4b33191d997e7ab4014f3daff1c09fbae7d9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e332d3838393242462e737667)](https://php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/62c328eaff92e95ea4ed4c55984f037795b5bb0e80359d080232fd0a05587464/68747470733a2f2f706f7365722e707567782e6f72672f6d6a6f686e736f6e2f6465636f64612f762f737461626c652e737667)](https://packagist.org/packages/mjohnson/decoda)[![PHPStan](https://camo.githubusercontent.com/f60d96f7c2579690ab6dfa8918f777fe93a02a92301c661eb38a85861a92b780/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230382d627269676874677265656e2e7376673f7374796c653d666c6174)](https://phpstan.org/)[![License](https://camo.githubusercontent.com/6717678220779b1a2a0b5e4d7d6e9c093c8f775222dda88c8d1502b1dc4ddaa4/68747470733a2f2f706f7365722e707567782e6f72672f6d6a6f686e736f6e2f6465636f64612f6c6963656e7365)](https://packagist.org/packages/mjohnson/decoda)

A lightweight lexical string parser for BBCode styled markup.

Contributors
------------

[](#contributors)

- "Marten-Plain" emoticons by Mårten Lundin - [http://adiumxtras.com/index.php?a=xtras&amp;xtra\_id=6920](http://adiumxtras.com/index.php?a=xtras&xtra_id=6920)
- "HTML\_BBCodeParser" by Seth Price - [http://pear.php.net/package/HTML\_BBCodeParser/](http://pear.php.net/package/HTML_BBCodeParser/)

Framework Integrations
----------------------

[](#framework-integrations)

- CakePHP - using [Markup plugin](https://github.com/dereuromark/cakephp-markup).
- Symfony - using [FMBbCodeBundle](https://github.com/helios-ag/FMBbCodeBundle).

Features
--------

[](#features)

- Parses custom code to valid (X)HTML markup
- Setting to make links and emails auto-clickable
- Setting to use shorthand text for links and emails
- Filters to parse markup and custom code
- Hooks to execute callbacks during the parsing cycle
- Loaders to load resources and files for configuration
- Engines to render complex markup using a template system
- Can censor offensive words
- Can convert smiley faces into images
- Basic support for localized messages
- Parser result caching
- Supports a wide range of tags
- Parent child node hierarchy
- Fixes incorrectly nested tags by removing the broken/unclosed tags
- Self closing tags
- Logs errors for validation
- Tag and attribute aliasing

Filters
-------

[](#filters)

The following filters and supported tags are available.

- Default - b, i, u, s, sup, sub, br, hr, abbr, time
- Block - align, float, hide, alert, note, div, spoiler, left, right, center, justify
- Code - code, source, var
- Email - email, mail
- Image - image, img
- List - list, olist, ol, ul, li, \*
- Quote - quote
- Text - font, size, color, h1-h6
- Url - url, link
- Video - video, youtube, vimeo, veoh, liveleak, dailymotion, myspace, wegame, collegehumor
- Table - table, thead, tbody, tfoot, tr, td, th, row, col

Hooks
-----

[](#hooks)

The following hooks are available.

- Censor - Censors all words found within config/censored
- Clickable - Converts all non-tag wrapped URLs and emails into clickable links
- Emoticon - Converts all smilies found within config/emoticons into emoticon images

Storage Engines
---------------

[](#storage-engines)

The following caching layers are supported.

- In-Memory
- Memcache
- Redis

Installation and Usage
----------------------

[](#installation-and-usage)

See [docs](/docs).

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity58

Moderate usage in the ecosystem

Community38

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 77.1% 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

Every ~67 days

Recently: every ~478 days

Total

57

Last Release

1284d ago

Major Versions

3.x-dev → 4.0.0-beta2012-09-21

4.x-dev → 5.0.0-beta2012-12-30

5.1.3 → 6.0.0-rc12013-03-30

PHP version history (4 changes)3.4PHP &gt;=5.2

4.0.0-betaPHP &gt;=5.3

5.1.1PHP &gt;=5.3.0

6.13.0PHP &gt;=7.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fde949ba5bf8f6af95b77cf88fe1362c4cc7519edbcd4f8891f1564da621fdb?d=identicon)[milesj](/maintainers/milesj)

---

Top Contributors

[![milesj](https://avatars.githubusercontent.com/u/143744?v=4)](https://github.com/milesj "milesj (413 commits)")[![alquerci](https://avatars.githubusercontent.com/u/2987860?v=4)](https://github.com/alquerci "alquerci (32 commits)")[![vladrusu](https://avatars.githubusercontent.com/u/1551081?v=4)](https://github.com/vladrusu "vladrusu (29 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (29 commits)")[![uzegonemad](https://avatars.githubusercontent.com/u/430255?v=4)](https://github.com/uzegonemad "uzegonemad (3 commits)")[![BlueM](https://avatars.githubusercontent.com/u/1493457?v=4)](https://github.com/BlueM "BlueM (3 commits)")[![Loveangel1337](https://avatars.githubusercontent.com/u/3483081?v=4)](https://github.com/Loveangel1337 "Loveangel1337 (3 commits)")[![helios-ag](https://avatars.githubusercontent.com/u/334907?v=4)](https://github.com/helios-ag "helios-ag (3 commits)")[![hilobok](https://avatars.githubusercontent.com/u/194895?v=4)](https://github.com/hilobok "hilobok (3 commits)")[![jonnsl](https://avatars.githubusercontent.com/u/217452?v=4)](https://github.com/jonnsl "jonnsl (3 commits)")[![gignonje](https://avatars.githubusercontent.com/u/1492645?v=4)](https://github.com/gignonje "gignonje (2 commits)")[![HDVinnie](https://avatars.githubusercontent.com/u/12850699?v=4)](https://github.com/HDVinnie "HDVinnie (2 commits)")[![yuks](https://avatars.githubusercontent.com/u/2283558?v=4)](https://github.com/yuks "yuks (1 commits)")[![Amegatron](https://avatars.githubusercontent.com/u/6664497?v=4)](https://github.com/Amegatron "Amegatron (1 commits)")[![darthryking](https://avatars.githubusercontent.com/u/5000346?v=4)](https://github.com/darthryking "darthryking (1 commits)")[![fkrauthan](https://avatars.githubusercontent.com/u/1679841?v=4)](https://github.com/fkrauthan "fkrauthan (1 commits)")[![hisorange](https://avatars.githubusercontent.com/u/3441017?v=4)](https://github.com/hisorange "hisorange (1 commits)")[![jcrombez](https://avatars.githubusercontent.com/u/777666?v=4)](https://github.com/jcrombez "jcrombez (1 commits)")[![lgiraudel](https://avatars.githubusercontent.com/u/487214?v=4)](https://github.com/lgiraudel "lgiraudel (1 commits)")[![maarekj](https://avatars.githubusercontent.com/u/1654977?v=4)](https://github.com/maarekj "maarekj (1 commits)")

---

Tags

bbcodebbcode-parserdecodaemoticonsfiltershookslexical-parserphpparserlexerfilterHOOKmarkupbbcodedecoda

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[clue/stream-filter

A simple and modern approach to stream filtering in PHP

1.7k261.7M7](/packages/clue-stream-filter)[s9e/text-formatter

Multi-purpose text formatting and markup library. Plugins offer support for BBCodes, Markdown, emoticons, HTML, embedding third-party media (YouTube, etc...), enhanced typography and more.

2413.1M29](/packages/s9e-text-formatter)[laminas/laminas-filter

Programmatically filter and normalize data and files

9428.0M150](/packages/laminas-laminas-filter)[millat/laravel-hooks

The WordPress filter, action system in Laravel

5715.1k](/packages/millat-laravel-hooks)[stolz/laravel-html-tidy

HTML Tidy middleware for Laravel

268.7k](/packages/stolz-laravel-html-tidy)

PHPackages © 2026

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