PHPackages                             chesszebra/pgn-splitter - 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. chesszebra/pgn-splitter

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

chesszebra/pgn-splitter
=======================

A PHP library to split PGN files into chunks per game or per section.

1.2.0(6y ago)49321MITPHPPHP ^7.1

Since Sep 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/chesszebra/pgn-splitter)[ Packagist](https://packagist.org/packages/chesszebra/pgn-splitter)[ RSS](/packages/chesszebra-pgn-splitter/feed)WikiDiscussions master Synced 3w ago

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

pgn-splitter
============

[](#pgn-splitter)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c063db1b0a14381d83604901bcf27f8ae1c0e5f582001eff869bff638a26a3ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63686573737a656272612f70676e2d73706c69747465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chesszebra/pgn-splitter)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/7e9efbfb17bd7d823767d0ed403cf0066cb21e55c7b8ee1d8426b19e5986fd79/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63686573737a656272612f70676e2d73706c69747465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/chesszebra/pgn-splitter)[![Coverage Status](https://camo.githubusercontent.com/7d41f8b0108c92b9442624fe8bf205da4562f7eac195138e7ecd206cbbe64b9f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f63686573737a656272612f70676e2d73706c69747465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/chesszebra/pgn-splitter/code-structure)[![Quality Score](https://camo.githubusercontent.com/cf2018f95ca062d4c3ec739afacbd1b64ce040cd22f508914d444cfd62527eca/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f63686573737a656272612f70676e2d73706c69747465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/chesszebra/pgn-splitter)[![Total Downloads](https://camo.githubusercontent.com/5350b74dbbe28ea05094ebded3a48a6f81fa3a8dc031b824e7ec9486190563e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63686573737a656272612f70676e2d73706c69747465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chesszebra/pgn-splitter)

A PHP library to split PGN files into chunks per game or per section.

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

[](#installation)

Via composer:

```
composer require chesszebra/pgn-splitter
```

Usage
-----

[](#usage)

Split a stream per game:

```
use ChessZebra\Chess\Pgn\Splitter;

$stream = fopen('my-games.pgn', 'r');

$splitter = new Splitter($stream, Splitter::SPLIT_GAMES);
$splitter->split(function(string $buffer) {
    echo $buffer;
});
```

Or split a stream per chunk (tags and moves chunks):

```
use ChessZebra\Chess\Pgn\Splitter;

$stream = fopen('my-games.pgn', 'r');

$splitter = new Splitter($stream, Splitter::SPLIT_CHUNKS);
$splitter->split(function(string $buffer) {
    echo $buffer;
});
```

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

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~270 days

Total

4

Last Release

2404d ago

### 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 (8 commits)")

---

Tags

chesschess-gamepgnphpportable-game-notationsplitsplittersplitting

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/chesszebra-pgn-splitter/health.svg)

```
[![Health](https://phpackages.com/badges/chesszebra-pgn-splitter/health.svg)](https://phpackages.com/packages/chesszebra-pgn-splitter)
```

###  Alternatives

[m6web/daemon-bundle

bundle sf easing creating daemon commands

59342.8k](/packages/m6web-daemon-bundle)[phundament/p3extensions

Phundament 3 Core Extensions

112.0k3](/packages/phundament-p3extensions)

PHPackages © 2026

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