tempest/markdown

Fast and extensible Markdown rendering with PHP

Maintainers

Package info

github.com/tempestphp/markdown

pkg:composer/tempest/markdown

Fund package maintenance!

brendt

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

0.0.1 2026-05-13 12:29 UTC

This package is auto-updated.

Last update: 2026-05-13 12:43:01 UTC


README

tempest/markdown is an incredibly fast Markdown parser written in PHP. It's designed to be extensible, and has a bunch of additional features built-in like code highlighting, table and div support, extended markup, and frontmatter support.

Important

This package is still a work in progress! Feel free to open issues.

Quickstart

composer require tempest/markdown

Render Markdown like this:

use Tempest\Markdown\Markdown;

$markdown = new Markdown();

$parsed = $markdown->parse(file_get_contents('README.md'));

echo $parsed->frontMatter['title'];
echo $parsed->html;

You can read more in the docs.

Performance

This package began as a challenge to make a more performant Markdown parser in pure PHP. The primary performance gain is from not relying on regex but instead using a simple lexer to tokenize Markdown files and convert them to HTML.

Benchmarks are included in this repo and can be run with composer bench after installing all dev dependencies. Here are the results on my machine for rendering the full Tempest docs:

Package Memory Time to parse
tempest/markdown 5.944mb 6.281ms
league/commonmark 21.114mb 56.993ms
michelf/php-markdown 7.343mb 23.215ms
erusev/parsedown-extra 8.485mb 15.163ms