PHPackages                             henshall/sudoku\_checker - 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. henshall/sudoku\_checker

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

henshall/sudoku\_checker
========================

Simple Class made for checking if a sudoku puzzle is valid

01PHP

Since Dec 21Pushed 6y agoCompare

[ Source](https://github.com/Henshall/sudoku_checker)[ Packagist](https://packagist.org/packages/henshall/sudoku_checker)[ RSS](/packages/henshall-sudoku-checker/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Sudoku Checker
==============

[](#sudoku-checker)

Version: 1.0.0
--------------

[](#version-100)

I had the task of creating a simple sudoku checker which would check if a given puzzle (in an array) is valid or not. Feel free to use this class in any Sodoku related projects you have :)

Installation:
-------------

[](#installation)

```
composer require henshall/sudoku_checker
```

Using on Laravel:
-----------------

[](#using-on-laravel)

```
use Henshall\SudokuChecker\SudokuChecker;
```

Usage:
------

[](#usage)

Soduku checker is instantiated and accepts a puzzle as an argument. We validate the puzzle, and then die / var\_dump its resulting value of is\_valid

```
$valid_sudoku = [
[7, 2, 6, 4, 9, 3, 8, 1, 5],
[3, 1, 5, 7, 2, 8, 9, 4, 6],
[4, 8, 9, 6, 5, 1, 2, 3, 7],
[8, 5, 2, 1, 4, 7, 6, 9, 3],
[6, 7, 3, 9, 8, 5, 1, 2, 4],
[9, 4, 1, 3, 6, 2, 7, 5, 8],
[1, 9, 4, 8, 3, 6, 5, 7, 2],
[5, 6, 7, 2, 1, 4, 3, 8, 9],
[2, 3, 8, 5, 7, 9, 4, 6, 1],
];
$sodoku_checker = new SudokuChecker($valid_sudoku);
die(var_dump($sodoku_checker->validate()));
```

Alternatively we can use the 'return\_string\_validity' function and return true/false as a string

```
$invalid_sudoku = [
[5, 3, 4, 6, 7, 8, 9, 1, 2],
[6, 7, 2, 1, 9, 5, 3, 4, 8],
[1, 9, 8, 3, 4, 2, 5, 6, 7],
[8, 5, 9, 9, 6, 1, 4, 2, 3],
[4, 2, 6, 8, 5, 3, 7, 9, 1],
[7, 1, 3, 7, 2, 4, 8, 5, 6],
[9, 6, 1, 5, 3, 7, 2, 8, 4],
[2, 8, 7, 4, 1, 9, 6, 3, 5],
[3, 4, 5, 2, 8, 6, 1, 7, 9],
];
$sodoku_checker = new SudokuChecker($invalid_sudoku);
$sodoku_checker->validate();
echo $sodoku_checker->return_string_validity();
```

You can also check the status of the puzzle by accessing the $is\_valid variable.

```
$sodoku_checker = new SudokuChecker($invalid_sudoku);
$sodoku_checker->validate();
$validity = $sodoku_checker->is_valid;
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/90d8f0c734f4da644d2356081c7f4d750a11b42c1ca448091853cbe95bc38d27?d=identicon)[weshenshall](/maintainers/weshenshall)

---

Top Contributors

[![Henshall](https://avatars.githubusercontent.com/u/20879253?v=4)](https://github.com/Henshall "Henshall (8 commits)")

### Embed Badge

![Health badge](/badges/henshall-sudoku-checker/health.svg)

```
[![Health](https://phpackages.com/badges/henshall-sudoku-checker/health.svg)](https://phpackages.com/packages/henshall-sudoku-checker)
```

###  Alternatives

[yurunsoft/swoole-co-pool

26388.0k1](/packages/yurunsoft-swoole-co-pool)[burdamagazinorg/thunder-project

Project template for Thunder projects with composer

2727.1k](/packages/burdamagazinorg-thunder-project)

PHPackages © 2026

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