PHPackages                             option/mac - 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. option/mac

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

option/mac
==========

A class to contain a mac adress

0.6.0(1y ago)06LGPL-3.0-or-laterPHPPHP ^8.1

Since Aug 17Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/Option-AS/Mac)[ Packagist](https://packagist.org/packages/option/mac)[ RSS](/packages/option-mac/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Value Object to represent a MAC address
=======================================

[](#value-object-to-represent-a-mac-address)

Read more about MAC adresses: [https://en.wikipedia.org/wiki/MAC\_address](https://en.wikipedia.org/wiki/MAC_address)

Supports a good number of input and output formats; hex strings, integer, bytes

Extracts various information about the mac adress:

- isUnicast()
- isMulticast()
- isUniversal()
- isLocal()

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1

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

[](#installation)

Via Composer

```
$ composer require option/mac
```

Usage
-----

[](#usage)

```
use Option\Mac\Mac;

// Any format will do; only hex digits is considered
$mac = Mac::factory("1234.5678.90AB");

// Output in various formats:
echo $mac;             // 01:23:45:67:89:AB
echo $mac->asColon();  // 01:23:45:67:89:AB
echo $mac->asDot();    // 0123.4567.89AB
echo $mac->asIEE802(); // 01-23-45-67-89-AB
echo $mac->asDash();   // 01-23-45-67-89-AB

// Keep the OUI but zero out the NIC.
echo $mac->vendor();   // 01-23-45-00-00-00
```

Test
----

[](#test)

```
$ composer test
```

A coverage report is generated in coverage/index.html

License
-------

[](#license)

The GNU Lesser General Public License (LGPL-3.0-or-later). Please see [License File](COPYING) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance45

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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 ~156 days

Total

4

Last Release

536d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/option-mac/health.svg)

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

PHPackages © 2026

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