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(9y ago)04.5kPHPPHP &gt;=5.3

Since Sep 1Pushed 9y 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 1mo 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 49% 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

3565d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fea7c4b3084cad318372880d976af052c4244249f989e15ab3b8d77b6eec27d?d=identicon)[kokspflanze](/maintainers/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

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

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