PHPackages                             alanx15a2/php-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. alanx15a2/php-binary-search

ActiveLibrary

alanx15a2/php-binary-search
===========================

global function do binary search.

v1.0.1(2y ago)210MITPHP

Since May 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/alanx15a2/php-binary-search)[ Packagist](https://packagist.org/packages/alanx15a2/php-binary-search)[ RSS](/packages/alanx15a2-php-binary-search/feed)WikiDiscussions master Synced 1mo ago

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

PHP BINARY SEARCH
=================

[](#php-binary-search)

Installation
------------

[](#installation)

To install the PHP Binary Search package, simply use Composer:

`composer require alanx15a2/php-binary-search`

Useage example
--------------

[](#useage-example)

Important Note: Binary search can only be performed on a **SORTED ARRAY**!

`array_search_binary($array, $target);`

If the target element is found, the function will return the key of the element. Otherwise, it will return -1.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Every ~0 days

Total

2

Last Release

743d ago

### Community

Maintainers

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

---

Top Contributors

[![alanx15a2](https://avatars.githubusercontent.com/u/46521210?v=4)](https://github.com/alanx15a2 "alanx15a2 (3 commits)")

---

Tags

binary-searchphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alanx15a2-php-binary-search/health.svg)

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

PHPackages © 2026

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