Skip to content

Instantly share code, notes, and snippets.

@brunoais
Created December 10, 2012 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunoais/4249234 to your computer and use it in GitHub Desktop.
Save brunoais/4249234 to your computer and use it in GitHub Desktop.
Testing alternative BBCode parsers
header("content-type:text/plain");
require_once( "jBBCodeIn1.php" );
$parser = new JBBCode\Parser();
$parser->loadDefaultCodes();
$text = '
[b]
[b]
boldy!
[/b]
[u]
[b]
[u]
underlined bold
[/u]
[/b]
[/u]
[/b]
[b]
another bold
[b]
[u]
another underlined bold
[/u]
[/b]
[u]
[b]
[/b]
[/u]
[/b]';
$start = microtime(true);
$parser->parse($text);
$result = $parser->getAsHtml();
$end = microtime(true);
var_dump($start, $end, $end - $start);
echo $result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment