option/mac
最新稳定版本:0.6.0
Composer 安装命令:
composer require option/mac
包简介
A class to contain a mac adress
README 文档
README
Read more about MAC adresses: 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
- PHP >= 8.1
Installation
Via Composer
$ composer require option/mac
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
$ composer test
A coverage report is generated in coverage/index.html
License
The GNU Lesser General Public License (LGPL-3.0-or-later). Please see License File for more information.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2023-10-16