PHPackages                             derokorian/bbcode - 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. derokorian/bbcode

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

derokorian/bbcode
=================

Simple BBCode parser

v1.0.2(10y ago)047MITPHPPHP &gt;=5.6.0

Since Feb 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/derokorian/bbcodes)[ Packagist](https://packagist.org/packages/derokorian/bbcode)[ RSS](/packages/derokorian-bbcode/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

bbcodes
=======

[](#bbcodes)

[![Build Status](https://camo.githubusercontent.com/a07c7a19eef74cf6773f56fe73f346554132600ea97c56a5cfdfce43ee8f0cc3/68747470733a2f2f7472617669732d63692e6f72672f6465726f6b6f7269616e2f6262636f6465732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/derokorian/bbcodes)[![Code Climate](https://camo.githubusercontent.com/7807d5bdfb10c7b76de351b46b86ad433c51dda5c93896ed32807faee0eb89b5/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6465726f6b6f7269616e2f6262636f6465732f6261646765732f6770612e737667)](https://codeclimate.com/github/derokorian/bbcodes)[![Test Coverage](https://camo.githubusercontent.com/6dbee088cbc73d91085987a476fb840473da886f4232e86cffb37b5b9061409d/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6465726f6b6f7269616e2f6262636f6465732f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/derokorian/bbcodes/coverage)

Simple class to parse BBCodes

Install via composer
--------------------

[](#install-via-composer)

```
composer require derokorian/bbcodes

```

Use the class
-------------

[](#use-the-class)

```
use Dero\BBCodes\BBCodes;

echo (new BBCodes)->fullClean($string);

// alternately, call clean and provide the options to use
echo (new BBCodes)->clean($string, BBCodes::OPT_LIST | BBCodes::OPT_BASIC);

// The following options exist
BBCodes::OPT_URLS
BBCodes::OPT_BASE (pre, strike, b, i, u)
BBCodes::OPT_CODE
BBCodes::OPT_LIST
BBCodes::OPT_QUOTE

BBCodes::OPT_BASIC = OPT_URLS | OPT_BASE | OPT_CODE | OPT_LIST | OPT_QUOTE

BBCodes::OPT_TITLE
BBCodes::OPT_IMG
BBCodes::OPT_NOPARSE

BBCodes::OPT_FULL = OPT_BASIC | OPT_TITLE | OPT_IMG | OPT_NOPARSE

```

Tags
----

[](#tags)

The following tags are available, depending on the options used. Tags are not case-sensitive.

```
[b]bold[/b]
[i]italic[/i]
[u]underline[/u]
[strike]struck through text[/strike]

[title]some title text[/title]
[subtitle]a smallter title text[/subtitle]

[list]
    [item]list item[/item]
    [item]list item[/item]
[/list]

[url]http://example.com[/url]
[url=http://example.com]some text[/url]
[urls]block of text containing many raw urls[/urls]

[img]http://url.to/image.jpg[/img]
[img=http://url.to/image.jpg]alt/title[/img]

[noparse]text not to be parsed for other BBCodes[/noparse]
[quote]something attributed to someone else[/quote]
[quote=author]something attributed to someone else[/quote]

[pre]preformatted text[/pre]
[code]some code that needs formatting maintained[/code]

```

### Code Tag upgrade

[](#code-tag-upgrade)

By default the code tag only preserves formatting, however if you require the suggested GenSynth package - then code may be modified to specify the language

```
composer require derokorian/gen-synth

[code=language]code to be highlighted as the specific language[/code]

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~9 days

Total

3

Last Release

3771d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v1.0.1PHP &gt;=5.6.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1512801?v=4)[Ryan Pallas](/maintainers/derokorian)[@derokorian](https://github.com/derokorian)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hiraku/xml_builder

Simple DSL for building XML

141.6k1](/packages/hiraku-xml-builder)

PHPackages © 2026

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