https://github.com/macpaw/similar-arrays
Library help check is similar arrays you have
https://github.com/macpaw/similar-arrays
check-similar-array same-array similar-array similarity
Last synced: 6 months ago
JSON representation
Library help check is similar arrays you have
- Host: GitHub
- URL: https://github.com/macpaw/similar-arrays
- Owner: MacPaw
- License: mit
- Created: 2022-01-16T13:18:05.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2023-01-12T14:46:40.000Z (over 2 years ago)
- Last Synced: 2024-11-14T18:09:43.839Z (11 months ago)
- Topics: check-similar-array, same-array, similar-array, similarity
- Language: PHP
- Homepage: https://github.com/MacPaw/SimilarArrays
- Size: 13.7 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
Similar Array Library
=================================| Version | Build Status | Code Coverage |
|:---------:|:-------------:|:-----:|
| `main`| [![CI][main Build Status Image]][main Build Status] | [![Coverage Status][main Code Coverage Image]][main Code Coverage] |
| `develop`| [![CI][develop Build Status Image]][develop Build Status] | [![Coverage Status][develop Code Coverage Image]][develop Code Coverage] |Installation
============```console
$ composer require macpaw/similar-arrays
```Example
============
Simple how check similar two arrays:
```php
$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:
```php
$similarArray = new SimilarArray();
$result = $similarArray->isArraysSimilar(['a' => '~\d+'], ['a' => 1111], ['a']);
var_dump($result) // true
```[main Build Status]: https://github.com/macpaw/SimilarArrays/actions?query=workflow%3ACI+branch%main
[main Build Status Image]: https://github.com/macpaw/SimilarArrays/workflows/CI/badge.svg?branch=main
[develop Build Status]: https://github.com/macpaw/SimilarArrays/actions?query=workflow%3ACI+branch%3Adevelop
[develop Build Status Image]: https://github.com/macpaw/SimilarArrays/workflows/CI/badge.svg?branch=develop
[main Code Coverage]: https://codecov.io/gh/macpaw/similar-arrays/branch/main
[main Code Coverage Image]: https://img.shields.io/codecov/c/github/macpaw/similar-arrays/main?logo=codecov
[develop Code Coverage]: https://codecov.io/gh/macpaw/similar-arrays/branch/develop
[develop Code Coverage Image]: https://img.shields.io/codecov/c/github/macpaw/similar-arrays/develop?logo=codecov