PHPackages                             vjandrea/network - 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. vjandrea/network

ActiveLibrary

vjandrea/network
================

Network helpers

010PHP

Since Mar 2Pushed 12y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Network helpers
===============

[](#network-helpers)

This is a work-in-progress collection of functions useful for storing network data in a database. The available methods are:

`mac2long` - Converts a MAC address in a long int. Default separators are ':' and '-'

`long2mac` - Converts a long int into a MAC address. Default separator is ':'

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

[](#installation)

Add `"vjandrea/network"` to your project's `composer.json`.

```
"require": {
	"vjandrea/network": "dev-master"
},
"minimum-stability" : "dev"

```

Then update via composer

```
composer update

```

Usage examples
--------------

[](#usage-examples)

Remember to add `use VJAndrea\Network;` when you want to use the function provided by this helper.

Example: i want to convert a MAC address to an integer for easier database storage:

```
$mac = '01-23-45-67-89-0A';

$long = Network::mac2long($mac); // $long value now is 1250999896330

```

Example: i want to take a MAC address that i saved as integer in the db and format it properly for the user:

```
$long = 1250999896330;

$mac = Network::long2mac($long); // $mac value now is '01:23:45:67:89:0A'

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/vjandrea-network/health.svg)

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

PHPackages © 2026

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