PHPackages                             kryshtalovich/algorithms - 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. kryshtalovich/algorithms

ActiveLibrary

kryshtalovich/algorithms
========================

Sort and search algorithms

1.0.0(5y ago)03proprietaryPHPPHP &gt;=7.1

Since Nov 20Pushed 5y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Sort and search algorithms
==========================

[](#sort-and-search-algorithms)

In this repository I'm implementing various algorithms. Currently, a bubble sort algorithm and a binary search algorithm are implemented.

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

[](#installation)

Require the package in `composer.json`

```
"require": {
    "kryshtalovich/algorithms": "1.*"
  }
```

Usage
-----

[](#usage)

### Bubble sorting

[](#bubble-sorting)

```
use Kryshtalovich\Algorithms\Sorts\Bubble;

//any numeric array
$array = [9, 7, 5, 6, 545, 66, 0, 4];

Bubble::Sort($array);

var_dump($array);
```

Output:

```
array(8) {
  [0]=>
  int(0)
  [1]=>
  int(4)
  [2]=>
  int(5)
  [3]=>
  int(6)
  [4]=>
  int(7)
  [5]=>
  int(9)
  [6]=>
  int(66)
  [7]=>
  int(545)
}

```

### Binary searching

[](#binary-searching)

```
use Kryshtalovich\Algorithms\Search\Binary;

//any numeric array
$array = [7, 7.5, 8, 8.3, 9.4];

$elementKey = Binary::Search($array, 8.3);

var_dump($elementKey);
```

Output:

```
int(3)

```

###  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

Maturity48

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

2003d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88a15d996898cc10fdd31250d7194b618ab77d3296ed1552289dcc219e9b39d1?d=identicon)[kryshtalovich](/maintainers/kryshtalovich)

---

Top Contributors

[![kryshtalovich](https://avatars.githubusercontent.com/u/48393228?v=4)](https://github.com/kryshtalovich "kryshtalovich (2 commits)")

### Embed Badge

![Health badge](/badges/kryshtalovich-algorithms/health.svg)

```
[![Health](https://phpackages.com/badges/kryshtalovich-algorithms/health.svg)](https://phpackages.com/packages/kryshtalovich-algorithms)
```

PHPackages © 2026

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