This library provides support for reading and writing chess boards in the Forsyth-Edwards notation.
Via composer
composer require chesszebra/forsyth-edwards-notation
use ChessZebra\ForsythEdwardsNotation\FenNotation;
$notation = new FenNotation('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1');
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
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.
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please report them via HackerOne.
The MIT License (MIT). Please see License File for more information.