PHPackages                             tzlion/muyl - 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. tzlion/muyl

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

tzlion/muyl
===========

parser for MUYL text formatting markup language

v0.1.2(6y ago)025MITPHPPHP &gt;=5.4CI failing

Since Sep 4Pushed 6y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

MUYL Markup Parser
==================

[](#muyl-markup-parser)

A parser for MUYL, a probably unnecessary markup language for text formatting which I invented to write my own blog posts. Converts MUYL to HTML.

The MUYL language itself and this parser are versioned separately, but since this parser is currently the only implementation and documentation of the language, at least the major and minor versions will probably match up.

Currently the language is at version **0.1.1**.

Usage
-----

[](#usage)

Install it and include it in your project somehow. Use composer, or don't, I'm not the boss of you. It has no dependencies aside from PHPUnit for testing and all the code is in MarkupParser.php.

Then you can either...

```
$markedUpText = '::this text is marked up::';
$parser = new TzLion\Muyl\MarkupParser();
$html = $parser->toHtml($yourMarkedUpText);

```

Or

```
$yourMarkedUpText = '::this text is marked up::';
$html = TzLion\Muyl\MarkupParser::toHtmlStatic($markedUpText);

```

`$markupSpecialChars` is also exposed as a static variable on `MarkupParser`, this is an array containing all special characters used by MUYL if you need them for something.

### Options

[](#options)

Both the MarkupParser constructor and the static method toHtmlStatic take four additional optional parameters, in order:

- `$allowHtml`, default `false`.
    If `true`, arbitrary HTML from the input text will be preserved. If `false`, HTML special chars will be escaped before parsing.
- `$allowExternalLinks`, default `true`.
    Enables or disables the external link syntax e.g. `[http://example.com]`.
- `$allowImages`, default `true`.
    Enables or disables the image embedding syntax e.g. `{path/to/img.jpg}`
- `$internalLinkCallback`, default `null`.
    Used in conjunction with the internal link syntax e.g. `[[some-page]]`. A callback taking in some kind of identifier for a page within your app and outputting an array containing 2 elements, a URL and the link text. If not set, internal links will be disabled.

Syntax
------

[](#syntax)

Syntax can be found in syntax.txt

To do
-----

[](#to-do)

- Nested lists
- Better config possibly allowing for any feature to be enabled/disabled

Irony
-----

[](#irony)

Yes I am aware of the irony of this readme file for a markup language parser being written in a different markup language to the language parsed by the parser thank you

Language version history
------------------------

[](#language-version-history)

v0.1.1 - adds the ability to insert line breaks in list items

v0.1.0 - first public release

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~209 days

Total

3

Last Release

2385d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/39ae7a17a6d541b80e78e9c771c9f6e33ffd64f6545eeed4de53795962d09fc7?d=identicon)[lions](/maintainers/lions)

---

Top Contributors

[![tzlion](https://avatars.githubusercontent.com/u/12863401?v=4)](https://github.com/tzlion "tzlion (20 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tzlion-muyl/health.svg)

```
[![Health](https://phpackages.com/badges/tzlion-muyl/health.svg)](https://phpackages.com/packages/tzlion-muyl)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M283](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M226](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M63](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M343](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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