PHPackages                             hanneskod/exemplify - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. hanneskod/exemplify

Abandoned → [hanneskod/readme-tester](/?search=hanneskod%2Freadme-tester)Project[Testing &amp; Quality](/categories/testing)

hanneskod/exemplify
===================

Validate code examples in readme files

1.0.0(5y ago)91301[5 issues](https://github.com/hanneskod/readme-tester/issues)[1 PRs](https://github.com/hanneskod/readme-tester/pulls)UnlicensePHPPHP &gt;=7.2

Since Jan 7Pushed 1y ago2 watchersCompare

[ Source](https://github.com/hanneskod/readme-tester)[ Packagist](https://packagist.org/packages/hanneskod/exemplify)[ Docs](https://github.com/hanneskod/readme-tester)[ RSS](/packages/hanneskod-exemplify/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (2)Versions (9)Used By (0)

Readme-Tester
=============

[](#readme-tester)

[![Packagist Version](https://camo.githubusercontent.com/8b0a03f5b739786bae3c6afba451e80398f925861537010fa138102e47a5a3be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616e6e65736b6f642f726561646d652d7465737465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hanneskod/readme-tester)[![Build Status](https://camo.githubusercontent.com/685c1f40aa5832e54f1f743138919157cd06ed72caa1f5c3ad6739bcbe7c3b8a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f68616e6e65736b6f642f726561646d652d7465737465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.com/github/hanneskod/readme-tester)[![Quality Score](https://camo.githubusercontent.com/4a2e4cd2c7ce4fcc5519d26ee2e43c87ab20f1bf245b1e02f64fec183a107c86/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f68616e6e65736b6f642f726561646d652d7465737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hanneskod/readme-tester)

Validate PHP code examples in documentation.

> This file describes version `2` which uses php8 attributes.

> For version `1` which uses docblock style annotations see [this link](https://github.com/hanneskod/readme-tester/tree/1.0.0).

Why?
----

[](#why)

Did you update your library, but forgot to update code examples in README? Are your users complaining on syntax errors in your examples? Do you find it too cumbersome to manually test all examples? Readme-Tester lets you automate the process of validating PHP code examples in documentation files.

### A simple example

[](#a-simple-example)

Readme-Tester uses php8 style attributes inside HTML-comments (to make them invisible after rendering on for example github) to specify the expected result of a code example.

The following simple example asserts that the code outputs content.

```

```php
echo "foobar";
```

```

For more information [read the documentation](/docs).

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

[](#installation)

### Using phive (recommended)

[](#using-phive-recommended)

Install using [phive](https://phar.io/)

```
phive install hanneskod/readme-tester
```

### As a phar archive

[](#as-a-phar-archive)

Download the latest phar archive from the [releases](https://github.com/hanneskod/readme-tester/releases) tab.

Optionally rename `readme-tester.phar` to `readme-tester` for a smoother experience.

### Using composer

[](#using-composer)

Install as a [composer](https://getcomposer.org/) dependency

```
composer require --dev hanneskod/readme-tester
```

This will make `readme-tester` avaliable as `vendor/bin/readme-tester`.

### From source

[](#from-source)

To build you need `make`

```
make
sudo make install
```

The build script uses [composer](https://getcomposer.org/) to handle dependencies and [phive](https://phar.io/) to handle build tools. If they are not installed as `composer` or `phive`respectivly you can use something like

```
make COMPOSER_CMD=./composer.phar PHIVE_CMD=./phive.phar
```

Getting started
---------------

[](#getting-started)

Using the command line tool is as simple as

```
readme-tester README.md
```

For more detailed information use

```
readme-tester -h
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 99.5% 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 ~241 days

Recently: every ~351 days

Total

7

Last Release

2006d ago

Major Versions

1.0.0 → 2.0.0-beta12020-12-25

PHP version history (5 changes)1.0-beta.1PHP &gt;=5.5

1.0-beta.2PHP &gt;=7.0

1.0-beta.4PHP &gt;=7.1

1.0.0-beta5PHP &gt;=7.2

2.0.0-beta1PHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![hanneskod](https://avatars.githubusercontent.com/u/1369274?v=4)](https://github.com/hanneskod "hanneskod (187 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

examplesphpunitreadmetestingtestingphpunitreadmecode examples

### Embed Badge

![Health badge](/badges/hanneskod-exemplify/health.svg)

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

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k129.9M910](/packages/brianium-paratest)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k27.9M2.2k](/packages/infection-infection)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k37.2M3.2k](/packages/phpspec-phpspec)[phpbench/phpbench

PHP Benchmarking Framework

2.0k14.0M782](/packages/phpbench-phpbench)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15311.8M36](/packages/magento-magento2-functional-testing-framework)

PHPackages © 2026

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