PHPackages                             macpaw/similar-arrays - 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. macpaw/similar-arrays

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

macpaw/similar-arrays
=====================

Check is similar arrays

v1.0.3(3mo ago)2252.3k↓14.6%1[1 PRs](https://github.com/MacPaw/similar-arrays/pulls)3MITPHPPHP &gt;=7.4CI passing

Since Jan 16Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/MacPaw/similar-arrays)[ Packagist](https://packagist.org/packages/macpaw/similar-arrays)[ RSS](/packages/macpaw-similar-arrays/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (7)Used By (3)

Similar Array Library
=====================

[](#similar-array-library)

VersionBuild StatusCode Coverage`main`[![CI](https://github.com/macpaw/SimilarArrays/workflows/CI/badge.svg?branch=main)](https://github.com/macpaw/SimilarArrays/actions?query=workflow%3ACI+branch%main)[![Coverage Status](https://camo.githubusercontent.com/fd0776c701a303b4326bb96a189868444c0d4daad22af28626660b218cbffbd0/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6d61637061772f73696d696c61722d6172726179732f6d61696e3f6c6f676f3d636f6465636f76)](https://codecov.io/gh/macpaw/similar-arrays/branch/main)`develop`[![CI](https://github.com/macpaw/SimilarArrays/workflows/CI/badge.svg?branch=develop)](https://github.com/macpaw/SimilarArrays/actions?query=workflow%3ACI+branch%3Adevelop)[![Coverage Status](https://camo.githubusercontent.com/ffbd008435944e0f41a04eb93837ef6d2421a906e414b8c228ba91af3e0a13a2/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6d61637061772f73696d696c61722d6172726179732f646576656c6f703f6c6f676f3d636f6465636f76)](https://codecov.io/gh/macpaw/similar-arrays/branch/develop)Installation
============

[](#installation)

```
$ composer require macpaw/similar-arrays
```

Example
=======

[](#example)

Simple how check similar two arrays:

```
$similarArray = new SimilarArray();
$result = $similarArray->isArraysSimilar(['test'], ['test']);
var_dump($result) // true

$result = $similarArray->isArraysSimilar(['test'], ['exit']);
var_dump($result) // false
```

How check signature value:

```
$similarArray = new SimilarArray();
$result = $similarArray->isArraysSimilar(['a' => '~\d+'], ['a' => 1111], ['a']);
var_dump($result) // true
```

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance79

Regular maintenance activity

Popularity37

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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 ~491 days

Total

4

Last Release

108d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.0

v1.0.3PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1935412?v=4)[MacPaw Inc.](/maintainers/macpaw)[@MacPaw](https://github.com/MacPaw)

![](https://www.gravatar.com/avatar/415a6c5f079859104abefc3592ee26337cfdb8466a98d1fadcd010072414523e?d=identicon)[Yozhef](/maintainers/Yozhef)

![](https://www.gravatar.com/avatar/d52c67d98f7c8c891f138e54370ee1d38b89d2be5e952eb4b586cdc69a6652eb?d=identicon)[igorgg](/maintainers/igorgg)

---

Top Contributors

[![Yozhef](https://avatars.githubusercontent.com/u/8971757?v=4)](https://github.com/Yozhef "Yozhef (10 commits)")[![zakhar-huzenko](https://avatars.githubusercontent.com/u/26282904?v=4)](https://github.com/zakhar-huzenko "zakhar-huzenko (4 commits)")

---

Tags

backendcheck-similar-arraymacpawphpsame-arraysimilar-arraysimilarityMacPawsimilarcheck-similar-arraysimilar-array

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/macpaw-similar-arrays/health.svg)

```
[![Health](https://phpackages.com/badges/macpaw-similar-arrays/health.svg)](https://phpackages.com/packages/macpaw-similar-arrays)
```

###  Alternatives

[algo26-matthias/idna-convert

A library for encoding and decoding internationalized domain names

712.3M14](/packages/algo26-matthias-idna-convert)[nystudio107/craft-similar

Similar for Craft lets you find elements, Entries, Categories, Commerce Products, etc, that are similar, based on... other related elements.

2675.4k1](/packages/nystudio107-craft-similar)[sulu/sulu-rector

Rector upgrades rules for Sulu CMS

17334.8k11](/packages/sulu-sulu-rector)

PHPackages © 2026

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