PHPackages                             marcmorente/pgn-parser - 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. marcmorente/pgn-parser

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

marcmorente/pgn-parser
======================

A PHP parser for the chess game notation format - PGN(Portable Game Notation)

1.0.1(4y ago)421GPL-3.0-onlyPHPPHP ^7.2 || ^8.0

Since Oct 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/marcmorente/pgn-parser)[ Packagist](https://packagist.org/packages/marcmorente/pgn-parser)[ Docs](https://github.com/marcmorente/pgn-parser)[ RSS](/packages/marcmorente-pgn-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Chess PGN parser in PHP
=======================

[](#chess-pgn-parser-in-php)

Install
-------

[](#install)

```
composer require marcmorente/pgn-parser

```

Example Code
------------

[](#example-code)

The code below parses a PGN file and prints the event, name of the white player, name of the black player, result and moves of each game.

```
