PHPackages                             grantlucas/php-portfinder - 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. grantlucas/php-portfinder

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

grantlucas/php-portfinder
=========================

A simple tool to find an available port within a range.

v1.0(11y ago)012.6kMITPHP

Since Jan 12Pushed 11y ago1 watchersCompare

[ Source](https://github.com/grantlucas/php-portfinder)[ Packagist](https://packagist.org/packages/grantlucas/php-portfinder)[ RSS](/packages/grantlucas-php-portfinder/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP Port Finder
===============

[](#php-port-finder)

A simple PHP package to find an available port within a range.

Installation using [Composer](https://getcomposer.org/)
-------------------------------------------------------

[](#installation-using-composer)

```
$ composer require grantlucas/php-portfinder

```

Usage
-----

[](#usage)

The following will return the first available port within the range for the provided host.

```
require_once(__DIR__ . '/vendor/autoload.php');
use GrantLucas\PortFinder;

$port = PortFinder::range('127.0.0.1', 9901, 9999);
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

4181d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/41b959aa5242becaaeb7326c76f1f602feca4f6400703cf546b33e615f9f9ae7?d=identicon)[grantlucas](/maintainers/grantlucas)

---

Top Contributors

[![grantlucas](https://avatars.githubusercontent.com/u/215729?v=4)](https://github.com/grantlucas "grantlucas (9 commits)")

### Embed Badge

![Health badge](/badges/grantlucas-php-portfinder/health.svg)

```
[![Health](https://phpackages.com/badges/grantlucas-php-portfinder/health.svg)](https://phpackages.com/packages/grantlucas-php-portfinder)
```

###  Alternatives

[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

52823.6M1.0k](/packages/bamarni-composer-bin-plugin)[mark-gerarts/auto-mapper-plus

An AutoMapper for PHP

5623.4M22](/packages/mark-gerarts-auto-mapper-plus)[codercat/jwk-to-pem

Convert JWK to PEM format.

1004.7M26](/packages/codercat-jwk-to-pem)[nfephp-org/sped-da

sped-da contêm as classes para criação dos documentos auxiliares referidos no projeto Sped.

149895.8k14](/packages/nfephp-org-sped-da)[magepal/magento2-customeraccountlinksmanager

Customer Account Links Manager for Magento2 allows you to quickly and easily remove unwanted links from customer account dashboard

4087.3k](/packages/magepal-magento2-customeraccountlinksmanager)

PHPackages © 2026

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