PHPackages                             aglaia-resident/chess.php - 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. aglaia-resident/chess.php

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

aglaia-resident/chess.php
=========================

Fork of ryanhs/chess.php. chess.php is a PHP chess library that is used for chess move generation/validation, piece placement/movement, and check/checkmate/stalemate detection - basically everything but the AI. NOTE: this is a port of chess.js for php

v2.2.0(3y ago)0151MITPHPPHP &gt;=8.1

Since May 20Pushed 3y agoCompare

[ Source](https://github.com/aglaia-resident/chess.php)[ Packagist](https://packagist.org/packages/aglaia-resident/chess.php)[ RSS](/packages/aglaia-resident-chessphp/feed)WikiDiscussions master Synced 1w ago

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

Chess.php
=========

[](#chessphp)

This project is a fork of [ryanhs/chess.php](https://github.com/ryanhs/chess.php), which is abandonned. chess.php itself was a port of [chess.js](https://github.com/jhlywa/chess.js). Main changes compared to the original ryanhs project are:

- It is compatible with PHP 8.1.
- PHP Unit has been updated to version 9
- The documentation has been imported right in the project

chess.php is a PHP chess library that is used for chess move generation/validation, piece placement/movement, and check/checkmate/stalemate detection - basically everything but the AI.

NOTE: this is a port of [chess.js](https://github.com/jhlywa/chess.js) for php

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

[](#installation)

`composer require aglaia-resident/chess.php`

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

[](#example-code)

The code below plays a complete game of chess ... randomly.

```
