PHPackages                             samclarke/sbb-code-parser - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. samclarke/sbb-code-parser

Abandoned → [kokspflanze/sbb-code-parser](/?search=kokspflanze%2Fsbb-code-parser)Library[Parsing &amp; Serialization](/categories/parsing)

samclarke/sbb-code-parser
=========================

fork from https://github.com/samclarke/SBBCodeParser

0.1.2(10y ago)04.5kPHPPHP &gt;=5.3

Since Sep 1Pushed 10y ago2 watchersCompare

[ Source](https://github.com/kokspflanze/SBBCodeParser)[ Packagist](https://packagist.org/packages/samclarke/sbb-code-parser)[ Docs](https://github.com/kokspflanze/SBBCodeParser)[ RSS](/packages/samclarke-sbb-code-parser/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

SBBCodeParser v1.1
==================

[](#sbbcodeparser-v11)

Copyright (C) 2011, Sam Clarke ()

SBBCodeParser is a simple BBCode parser.

### Example usage:

[](#example-usage)

```
$parser = new \SBBCodeParser\Node_Container_Document();

$parser->add_emoticons(array(
	':)' => 'http://localhost/Classes/SCEditor-punbb/punbb-1.3.5/img/smilies/smile.png',
	'=)' => 'http://localhost/Classes/SCEditor-punbb/punbb-1.3.5/img/smilies/smile.png'
));

echo $parser->parse('This should be [b]bold[/b] and this should be [i]italic[/i]')
	->detect_links()
	->detect_emails()
	->detect_emoticons()
	->get_html();

```

### Example of adding a custom BBCode:

[](#example-of-adding-a-custom-bbcode)

```
$bbcode = new \SBBCodeParser\BBCode('youtube', function($content, $attribs)
{
    if (preg_match('/http([s]?):\/\/(([w]{3}\.)?)youtube\.com\//s', $content)) {
        $uri = str_replace('http://', 'https://', $content);
    } else {
        $uri = 'https://www.youtube.com/embed/' . $content;
    }

	return '';
}, \SBBCodeParser\BBCode::BLOCK_TAG, false, array(), array('text_node'), \SBBCodeParser\BBCode::AUTO_DETECT_EXCLUDE_ALL);

$parser->add_bbcode($bbcode);

```

### Currently included default BBCodes:

[](#currently-included-default-bbcodes)

```
b
i
strong
em
u
s
blink
sub
sup
ins
del
right
left
center
justify
note
hidden
abbr
acronym
icq
skype
bing
google
wikipedia
youtube
vimeo
flash
paypal
pastebin
gist
twitter
tweets
googlemaps
pdf
scribd
spoiler
tt
pre
code
php
quote
font
size
color
list
ul
ol
li
*
table
th
h
tr
row
r
td
col
c
notag
nobbc
noparse
h1
h2
h3
h4
h5
h6
big
small
br
sp
hr
anchor
goto
jumpto
img
email
url

```

License
=======

[](#license)

SBBCodeParser is licensed under the LGPL license:

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~174 days

Total

3

Last Release

3656d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1885435?v=4)[Oliver](/maintainers/kokspflanze)[@kokspflanze](https://github.com/kokspflanze)

---

Top Contributors

[![kokspflanze](https://avatars.githubusercontent.com/u/1885435?v=4)](https://github.com/kokspflanze "kokspflanze (10 commits)")[![jmocha](https://avatars.githubusercontent.com/u/8739963?v=4)](https://github.com/jmocha "jmocha (5 commits)")[![christianrank](https://avatars.githubusercontent.com/u/3001431?v=4)](https://github.com/christianrank "christianrank (4 commits)")[![samclarke](https://avatars.githubusercontent.com/u/490870?v=4)](https://github.com/samclarke "samclarke (1 commits)")

---

Tags

SBBCodeParser

### Embed Badge

![Health badge](/badges/samclarke-sbb-code-parser/health.svg)

```
[![Health](https://phpackages.com/badges/samclarke-sbb-code-parser/health.svg)](https://phpackages.com/packages/samclarke-sbb-code-parser)
```

###  Alternatives

[mwgg/airports

A JSON collection of ~29k entries with basic information about nearly every airport and landing strip in the world

7683.4k](/packages/mwgg-airports)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9845.4k](/packages/sauladam-shipment-tracker)[glauberportella/cnab-layouts-parser

Parser de arquivos de configuração CNAB gerados no projeto https://github.com/glauberportella/cnab-layouts

2154.5k](/packages/glauberportella-cnab-layouts-parser)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.4k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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