PHPackages                             kfosoft/php-ip-helper - 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. kfosoft/php-ip-helper

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

kfosoft/php-ip-helper
=====================

PHP IP Helper

1.2(7y ago)0349PHPPHP &gt;=5.4.0

Since Oct 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/kfosoft/php-ip-helper)[ Packagist](https://packagist.org/packages/kfosoft/php-ip-helper)[ RSS](/packages/kfosoft-php-ip-helper/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (4)Used By (0)

PHP IP Helper
=============

[](#php-ip-helper)

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

[](#installation)

Installation with Composer

Either run

```
    php composer.phar require kfosoft/php-ip-helper:"*"

```

or add in composer.json

```
    "require": {
        ...
        "kfosoft/php-ip-helper":"*"
    }

```

Well done!

API
---

[](#api)

```
localIpsV4 - Return local ips. Use ifconfig.
localIpV4  - Return local ip. Use ifconfig.
validate   - Validate ip.
validateV4 - Validate ipv4.
validateV6 - Validate ipv6.
ipv4ToLong - Ip v4 to long.
longToIpv4 - Long to ipv4.
ipv6ToLong - Ip v6 to long.
longToIpv6 - Long to Ip v6.
ip2bin     - Ip to bin.
bin2ip     - Bin to ip.
version    - Returns ip version.

```

Example
-------

[](#example)

```
use kfosoft\helpers\IP;

var_dump(IP::localIpsV4());

```

##### Result

[](#result)

```
array(2) {
  ["eth0"]=>
  string(13) "192.168.0.105"
  ["lo"]=>
  string(9) "127.0.0.1"
}

```

Enjoy, guys!

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Every ~602 days

Total

3

Last Release

2718d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3544388a2defce630d5b16fe9c38c91057278147939e8fac9a419386c3984a98?d=identicon)[kfosoft](/maintainers/kfosoft)

---

Top Contributors

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

---

Tags

phpphp ipip-helperphp helperphp ip helper

### Embed Badge

![Health badge](/badges/kfosoft-php-ip-helper/health.svg)

```
[![Health](https://phpackages.com/badges/kfosoft-php-ip-helper/health.svg)](https://phpackages.com/packages/kfosoft-php-ip-helper)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21623.4k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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