| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not yet rated by the users | Total: 82 | All time:  10,085 This week: 146  | ||||
| Version | License | PHP version | Categories | |||
| ip-addresses 1.0.0 | Custom (specified... | 5 | Networking, PHP 5, Parsers | 
| Description | Author | |||||||||||||||||||||||
| This package can be used validate and normalize IPv4 and IPv6 addresses. | 
 | |||||||||||||||||||||||
Mesour\IpAddresses\IpAddressValidatorAssert::true(IpAddressValidator::isIpV6('2a00:5565:2222:800::200e'));
Assert::true(IpAddressValidator::isIpV4('127.0.0.1'));
Mesour\IpAddresses\IpAddressNormalizerNormalize IPv6:
IpAddressNormalizer::normalizeIpV6('2001:db8:800::ff00:42:8329');
// result is: 2001:0db8:0800:0000:0000:ff00:0042:8329
Compress IPv6:
IpAddressNormalizer::compressIpV6('2001:0db8:0800:0000:0000:ff00:0042:8329');
// result is: 2001:db8:800::ff00:42:8329
|  Files (15) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  bin (3 files) | ||||
|  src (1 directory) | ||||
|  tests (2 files, 1 directory) | ||||
|    .travis.yml | Data | Auxiliary data | ||
|    composer.json | Data | Auxiliary data | ||
|    license.md | Lic. | License text | ||
|    phpstan.neon | Data | Auxiliary data | ||
|    README.md | Doc. | Documentation | ||
|    ruleset.xml | Data | Auxiliary data | ||
|  Files (15) | / | bin | 
| File | Role | Description | 
|---|---|---|
|    check-cs | Data | Auxiliary data | 
|    check-stan | Data | Auxiliary data | 
|    check-tests | Data | Auxiliary data | 
|  Files (15) | / | src | / | Mesour | / | IpAddresses | 
| File | Role | Description | 
|---|---|---|
|  IpAddressNormalizer.php | Class | Class source | 
|  IpAddressValidator.php | Class | Class source | 
|  Files (15) | / | tests | 
| File | Role | Description | ||
|---|---|---|---|---|
|  Mesour (1 directory) | ||||
|    bootstrap.php | Aux. | Auxiliary script | ||
|    php.ini | Data | Auxiliary data | ||
|  Files (15) | / | tests | / | Mesour | / | IpAddressesTests | 
| File | Role | Description | 
|---|---|---|
|  BaseTestCase.php | Class | Class source | 
|  IpAddressNormalizerTest.phpt | Class | Class source | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.