PHP

Markdown libraries for PHP — a fully extensible parser and a tiny single-file option. Back to the overview.

league/commonmark

A highly extensible, CommonMark- and GFM-compliant parser by The PHP League; used by Laravel.

CommonMarkGFM
use League\CommonMark\CommonMarkConverter;

$converter = new CommonMarkConverter();
echo $converter->convert('# Hello *world*');

View league/commonmark →

Parsedown

A single-file, dependency-free parser that is fast and simple to drop in.

lightweight
$Parsedown = new Parsedown();
echo $Parsedown->text('# Hello *world*');

View Parsedown →