2017 © Pedro Peláez
 

library bbcode

A powerful, extensive recursive regexp BBCode parser. PHP 7+

image

chillerlan/bbcode

A powerful, extensive recursive regexp BBCode parser. PHP 7+

  • Friday, March 3, 2017
  • by codemasher
  • Repository
  • 3 Watchers
  • 2 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 4 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

chillerlan/php-bbcode

A recursive regexp BBCode parser for PHP 7+ using preg_replace_callback(), based on an example by MrNiceGuy on developers-guide.net. Handles nested tags as well as matching brackets and doesn't stumble across invalid tags., (*1)

version ![license][license-badge] ![Travis][travis-badge] ![Coverage][coverage-badge] ![Scrunitizer][scrutinizer-badge] ![Packagist downloads][downloads-badge] ![PayPal donate][donate-badge], (*2)

Requirements

  • PHP 7.2+

Documentation

Installation

requires composer, (*3)

composer.json

(note: replace dev-master with a version boundary), (*4)

{
    "require": {
        "php": ">=7.2.0",
        "chillerlan/php-bbcode": "dev-master"
    }
}

Manual installation

Download the desired version of the package from master or release and extract the contents to your project folder. After that: - run composer install to install the required dependencies and generate /vendor/autoload.php. - if you use a custom autoloader, point the namespace chillerlan\BBCode to the folder src of the package, (*5)

Profit!, (*6)

Usage

  • @todo

For an implementation example see the GWBBCoder over here: gw1-database/GWBBCode., (*7)

Language

  • @todo

Notes

The parser may cause some high CPU load, depending on the input. You should never consider to use it somewhere in your output subsystem - encode on input - you'll want a preview anyway. ;), (*8)

You may also run into several bugs. In fact, the BBCoder is essentially a tool to squeeze out any PCRE related bug in PHP known to man (and perhaps unknown). Have fun! ;) It is highly recommended to use these php.ini settings, especially to disable the PCRE JIT in PHP7 which is a troublemaker. In case you happen to run into a PCRE related bug, i ask you to open an issue over here along with the bbcode which caused the error and further information., (*9)

Disclaimer!

I don't take responsibility for molten CPUs, smashed keyboards, broken HTML etc.. Use at your own risk!, (*10)

The Versions

03/03 2017

dev-master

9999999-dev https://github.com/codemasher/php-bbcode

A powerful, extensive recursive regexp BBCode parser. PHP 7+

  Sources   Download

MIT

The Requires

 

The Development Requires

parser bbcode

02/03 2016

dev-php5

dev-php5 https://github.com/chillerlan/bbcode

A powerful, extensive recursive regexp BBCode parser. PHP 5.6+, PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

parser bbcode

29/02 2016

1.1.0

1.1.0.0 https://github.com/chillerlan/bbcode

A powerful, extensive recursive regexp BBCode parser. PHP 5.6+, PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

parser bbcode

28/02 2016

1.0.3

1.0.3.0 https://github.com/chillerlan/bbcode

A powerful, extensive recursive regexp BBCode parser. PHP 5.6+, PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

parser bbcode

09/11 2015

1.0.2

1.0.2.0 https://github.com/chillerlan/bbcode

A powerful, extensive recursive regexp BBCode parser. PHP 5.6+, PHP 7

  Sources   Download

MIT

The Requires

 

parser bbcode

03/11 2015

1.0.1

1.0.1.0 https://github.com/chillerlan/bbcode

A regexp BBCode parser.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

parser bbcode

03/11 2015

1.0.0

1.0.0.0 https://github.com/chillerlan/bbcode

A regexp BBCode parser.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

parser bbcode