PHPackages                             faisalrehmanid/fr-binary-search - 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. faisalrehmanid/fr-binary-search

ActiveLibrary

faisalrehmanid/fr-binary-search
===============================

This library provide binary search implementation for 2D array

1.0.0(4y ago)03MITPHPPHP &gt;=5.4.0

Since Jul 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/faisalrehmanid/fr-binary-search)[ Packagist](https://packagist.org/packages/faisalrehmanid/fr-binary-search)[ RSS](/packages/faisalrehmanid-fr-binary-search/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

What to do?
===========

[](#what-to-do)

This library provide binary search implementation for 2D array

How to use?
===========

[](#how-to-use)

```
// What value to search e.g. '2'
$needle = '2';

// Search from array
$haystack = [
    ['id' => '1', 'name' => 'name_1'],
    ['id' => '2', 'name' => 'name_2'],
    ['id' => '3', 'name' => 'name_3']
];

// Search key from array. e.g. 'id' must be ASC sorted
$key = 'id';

// $results always will be array
$results = \FR\BinarySearch\BinarySearchUtil::binarySearch($needle, $haystack, $key);

echo '';
    print_r($results);
echo '';

```

How to test?
============

[](#how-to-test)

To execute PHPUnit tests

1. Point to /vendor/bin dir `cd ./vendor/bin`
2. Execute PHPUnit tests: `phpunit --configuration ./../../tests/phpunit.xml`
3. To check phpunit version: `phpunit --version`

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1769d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4922068?v=4)[Faisal Rehman](/maintainers/faisalrehmanid)[@faisalrehmanid](https://github.com/faisalrehmanid)

---

Top Contributors

[![faisalrehmanid](https://avatars.githubusercontent.com/u/4922068?v=4)](https://github.com/faisalrehmanid "faisalrehmanid (1 commits)")

---

Tags

binary search

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/faisalrehmanid-fr-binary-search/health.svg)

```
[![Health](https://phpackages.com/badges/faisalrehmanid-fr-binary-search/health.svg)](https://phpackages.com/packages/faisalrehmanid-fr-binary-search)
```

PHPackages © 2026

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