PHPackages                             aldin-sxr/ip-format-tools - 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. aldin-sxr/ip-format-tools

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

aldin-sxr/ip-format-tools
=========================

A collection of utilities for working with IPv4/IPv6 addresses.

v1.0.0(6y ago)145[1 PRs](https://github.com/Aldin-SXR/ip-format-tools/pulls)MITPHP

Since Oct 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Aldin-SXR/ip-format-tools)[ Packagist](https://packagist.org/packages/aldin-sxr/ip-format-tools)[ RSS](/packages/aldin-sxr-ip-format-tools/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

IP Formatting Tools
===================

[](#ip-formatting-tools)

[![Build Status](https://camo.githubusercontent.com/a783189b3ce78361beecb45a7ceabfbe8431ddd4817c5fb5dcaed90bb36eff65/68747470733a2f2f7472617669732d63692e636f6d2f416c64696e2d5358522f69702d666f726d61742d746f6f6c732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Aldin-SXR/ip-format-tools)

This is a small collection of useful methods related to working with IP addresses. Right now, the library provides the ability to convert **both IPv4 and IPv6** addresses to long integers, as well as vice versa. Moreover, the library also provides a way to represent IPv4 addresses in IPv6 format (e.g. 34.26.0.75 =&gt; *::ffff:221a:4b*)

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

[](#installation)

The library is available via Composer.

`composer require aldin-sxr/ip-format-tools`

After installing, include `vendor/autoload.php` and the `IPFormat` namespace to your project.

```
