PHPackages                             chesszebra/forsyth-edwards-notation - 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. chesszebra/forsyth-edwards-notation

ActiveLibrary

chesszebra/forsyth-edwards-notation
===================================

A PHP library that parses Forsyth-Edwards Notation (FEN) values.

1.2.0(5y ago)146MITPHPPHP ^7.4CI failing

Since Mar 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/chesszebra/forsyth-edwards-notation)[ Packagist](https://packagist.org/packages/chesszebra/forsyth-edwards-notation)[ RSS](/packages/chesszebra-forsyth-edwards-notation/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

forsyth-edwards-notation
========================

[](#forsyth-edwards-notation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8f3b0a82362a7b77b21e18f0f47bd32f13d6503f20735a07f5f0eca12241ff5d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63686573737a656272612f666f72737974682d656477617264732d6e6f746174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chesszebra/forsyth-edwards-notation)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/7242249db0d5f30d13976becf3d8765d5dd51e20e1b3186cb65cee97e3f2ead3/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63686573737a656272612f666f72737974682d656477617264732d6e6f746174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/chesszebra/forsyth-edwards-notation)[![Total Downloads](https://camo.githubusercontent.com/b35204310f851d1d0271d3fad1cd4153fdf3c32bad8f53993a0ad409a35125b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63686573737a656272612f666f72737974682d656477617264732d6e6f746174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chesszebra/forsyth-edwards-notation)

This library provides support for reading and writing chess boards in the Forsyth-Edwards notation.

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

[](#installation)

Via composer

```
composer require chesszebra/forsyth-edwards-notation

```

Usage
-----

[](#usage)

### Parse a FEN

[](#parse-a-fen)

```
use ChessZebra\ForsythEdwardsNotation\FenNotation;

$notation = new FenNotation('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1');
```

### Convert a FEN to a string

[](#convert-a-fen-to-a-string)

```
use ChessZebra\ForsythEdwardsNotation\FenNotation;

$notation = new FenNotation('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1');

echo $notation->toString(); // or cast it: (string)$notation
```

### Validating a FEN

[](#validating-a-fen)

```
use ChessZebra\ForsythEdwardsNotation\Validator;

$validator = new Validator();

$validationResult = $validator->validate('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1');

// $validationResult is a ValidationResult constant.
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please report them via [HackerOne](https://hackerone.com/chesszebra).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

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

Every ~185 days

Total

3

Last Release

1867d ago

PHP version history (2 changes)1.0.0PHP ^7.2

1.2.0PHP ^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ee7f711ef4d45ada0ac92c7ab2f548055a7cfbe718da6c4bbb81b2f6693c528?d=identicon)[waltertamboer](/maintainers/waltertamboer)

---

Top Contributors

[![waltertamboer](https://avatars.githubusercontent.com/u/508054?v=4)](https://github.com/waltertamboer "waltertamboer (15 commits)")

---

Tags

boardchesschessboardfenforsyth-edwardsforsyth-edwards-notationphpreaderwriter

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/chesszebra-forsyth-edwards-notation/health.svg)

```
[![Health](https://phpackages.com/badges/chesszebra-forsyth-edwards-notation/health.svg)](https://phpackages.com/packages/chesszebra-forsyth-edwards-notation)
```

PHPackages © 2026

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