PHPackages                             crecket/php-markup - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. crecket/php-markup

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

crecket/php-markup
==================

A super basic library to generate markup code

1.0.0(9y ago)029WTFPLPHPPHP &gt;=5.5.0

Since Sep 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Crecket/php-markup)[ Packagist](https://packagist.org/packages/crecket/php-markup)[ Docs](https://github.com/Crecket/php-markup)[ RSS](/packages/crecket-php-markup/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

php-markup
==========

[](#php-markup)

Create markup code suitable for reddit.

Examples
--------

[](#examples)

```
use Crecket\PHPMarkup\Format;

$markup = new \Crecket\PHPMarkup\Markup();

// a table with some text and custom headers
$markup->table(

    // a array with list of the column names
    array(
        Format\Italic::get('italic column header'),
        Format\Strike::get('bad column'),
        'column3'
    ),

    // a array with rows in it
    array(

        // a array with data for the first row
        array(
            rand(1, 1000),
            rand(1, 1000),
            rand(1, 1000),
        ),

        // a array with data for the second row
        array(
            rand(1, 1000),
            rand(1, 1000),
            rand(1, 1000),
        ),
    )
);

// new line
$markup->newLine();

// basic link
$markup->link('a title for my link', 'https://www.masterypoints.com');

// titles
$markup->line(Format\Title1::get('title1'), true);
$markup->line(Format\Title2::get('title2'), true);
$markup->line(Format\Title3::get('title3'), true);
$markup->line(Format\Title4::get('title4'), true);

// basic b/i/s formatting
$markup->line(Format\Italic::get('italic text'), true);
$markup->line(Format\Bold::get('bold text'), true);
$markup->line(Format\Strike::get('strike through text'), true);

// automatically makes sure all words are super script
$markup->line(Format\SuperScript::get('super script text'), true);

// code formatting
$markup->line(Format\Formatted::get("formatted text \nmultiline \ncode"), true);

// code inline formatting variation
$markup->line(Format\InlineFormatted::get('inline formatted text'), true);

// escape any special characters
$markup->line(Format\Escaped::get('*escaped special characters*'), true);

// a qouted multi line text
$markup->line(Format\Qoute::get("wew I'm important \n\- some important dude"), true);

// get result
$markup_result = $markup->get();
```

This results in:

*italic column header*bad columncolumn358185624740421981[a title for my link](https://www.masterypoints.com)title1
======

[](#title1)

title2
------

[](#title2)

### title3

[](#title3)

#### title4

[](#title4)

*italic text*

**bold text**

strike through text

^super ^script ^text

```
formatted text
multiline
code

```

`inline formatted text`

\*escaped special characters\*

> wew I'm important

> \- some important dude

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3567d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce40a957cded3417a986fc49971e429eafbf3ead0a2c8e23433b61fa360b22e8?d=identicon)[Crecket](/maintainers/Crecket)

---

Top Contributors

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

---

Tags

markupreddit

### Embed Badge

![Health badge](/badges/crecket-php-markup/health.svg)

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

###  Alternatives

[pragmarx/laravelcs

PHP\_CodeSniffer custom Sniff for Laravel coding standard

236112.4k2](/packages/pragmarx-laravelcs)[datlechin/filament-menu-builder

Create and manage menus and menu items

14356.9k3](/packages/datlechin-filament-menu-builder)[t3/dce

Best FlexForm based content elements since 2012. With TCA mapping feature, simple backend view and much more features which makes it super easy to create own content element types.

17455.8k1](/packages/t3-dce)[hanson/rainbow

4710.5k](/packages/hanson-rainbow)

PHPackages © 2026

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