PHPackages                             breeswish/php-marked - 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. breeswish/php-marked

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

breeswish/php-marked
====================

A PHP markdown parser, ported from marked. Built for speed.

v0.3.3(11y ago)1415.7k↓50%MITHTMLPHP &gt;5.3.0

Since Feb 19Pushed 11y ago1 watchersCompare

[ Source](https://github.com/SummerWish/php-marked)[ Packagist](https://packagist.org/packages/breeswish/php-marked)[ RSS](/packages/breeswish-php-marked/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

php-marked - Yet Another PHP Markdown Parser
============================================

[](#php-marked---yet-another-php-markdown-parser)

A full-featured PHP markdown parser.

- Ported from [chjj/marked](https://github.com/chjj/marked), consistent with previewing by JavaScript
- Support [Github Flavoured Markdown](https://help.github.com/articles/github-flavored-markdown)

    - Multiple underscores in words
    - URL autolinking
    - Strikethrough
    - Fenced code blocks
    - Tables
- High performance

Requirements
------------

[](#requirements)

- PHP 5.3+
- Composer

Installation
------------

[](#installation)

```
composer require "breeswish/php-marked"
```

Usage
-----

[](#usage)

Minimal usage:

```
echo \Breezewish\Marked\Marked::render('I am using __markdown__.');
// => I am using markdown.
```

Example setting options with default values:

```
\Breezewish\Marked\Marked::setOptions(array(
    'gfm'          => true,
    'tables'       => true,
    'breaks'       => false,
    'pedantic'     => false,
    'sanitize'     => false,
    'smartLists'   => false,
    'smartypants'  => false,
    'langPrefix'   => 'lang-',
    'xhtml'        => false,
    'headerPrefix' => '',
    'highlight'    => null,
    'renderer'     => new \Breezewish\Marked\Renderer()
));

echo \Breezewish\Marked\Marked::render('I am using __markdown__.');
```

Marked::render(markdownString \[,options\])
-------------------------------------------

[](#markedrendermarkdownstring-options)

### markdownString

[](#markdownstring)

Type: `string`

String of markdown source to be compiled.

### options

[](#options)

Type: `array`

Hash of options. Can also be set using the `Marked::setOptions` method as seen above.

Basic Options
-------------

[](#basic-options)

### gfm

[](#gfm)

Type: `boolean`Default: `true`

Enable [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown).

### tables

[](#tables)

Type: `boolean`Default: `true`

Enable GFM [tables](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-tables). This option requires the `gfm` option to be true.

### breaks

[](#breaks)

Type: `boolean`Default: `false`

Enable GFM [line breaks](https://help.github.com/articles/github-flavored-markdown#newlines). This option requires the `gfm` option to be true.

### pedantic

[](#pedantic)

Type: `boolean`Default: `false`

Conform to obscure parts of `markdown.pl` as much as possible. Don't fix any of the original markdown bugs or poor behavior.

### sanitize

[](#sanitize)

Type: `boolean`Default: `false`

Sanitize the output. Ignore any HTML that has been input.

### smartLists

[](#smartlists)

Type: `boolean`Default: `true`

Use smarter list behavior than the original markdown. May eventually be default with the old behavior moved into `pedantic`.

### smartypants

[](#smartypants)

Type: `boolean`Default: `false`

Use "smart" typograhic punctuation for things like quotes and dashes.

### langPrefix

[](#langprefix)

Type: `string`Default: `"lang-"`

The prefix to be append in the className of ``.

### xhtml

[](#xhtml)

Type: `boolean`Default: `false`

Render XHTML.

### headerPrefix

[](#headerprefix)

Type: `string`Default: `""`

The prefix to be append in the `id` attribute of headers.

Testing
-------

[](#testing)

run `phpunit`.

License
-------

[](#license)

The MIT License.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

4107d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6681b98d19fd35c720b902c25fd65a430441f95dacd342cee9157a4a059887c9?d=identicon)[breeswish](/maintainers/breeswish)

---

Top Contributors

[![breezewish](https://avatars.githubusercontent.com/u/1916485?v=4)](https://github.com/breezewish "breezewish (7 commits)")

---

Tags

gfmmarkdownphpphp-markdown-parserparsermarkdownmarked

### Embed Badge

![Health badge](/badges/breeswish-php-marked/health.svg)

```
[![Health](https://phpackages.com/badges/breeswish-php-marked/health.svg)](https://phpackages.com/packages/breeswish-php-marked)
```

###  Alternatives

[erusev/parsedown

Parser for Markdown.

15.0k151.8M732](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k404.0M702](/packages/league-commonmark)[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84314.8M192](/packages/erusev-parsedown-extra)[parsedown/parsedown

Parser for Markdown.

21342.8k3](/packages/parsedown-parsedown)[tovic/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5933.7k](/packages/tovic-parsedown-extra-plugin)[taufik-nurrohman/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5932.3k](/packages/taufik-nurrohman-parsedown-extra-plugin)

PHPackages © 2026

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