Download the PHP package rupadana/ipv4-calculator without Composer
On this page you can find all versions of the php package rupadana/ipv4-calculator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rupadana/ipv4-calculator
More information about rupadana/ipv4-calculator
Files in rupadana/ipv4-calculator
Package ipv4-calculator
Short Description Network calculator for subnet mask and other classless (CIDR) network information.
License MIT
Homepage https://github.com/rupadana/ipv4-calculator
Informations about the package ipv4-calculator
IPv4 Calculator (PHP)
Network calculator for subnet mask and other classless (CIDR) network information.
Features
Given an IP address and CIDR network size, it calculates the network information and provides all-in-one aggregated reports.
Calculations
- IP address
- Network size
- Subnet mask
- Network portion
- Host portion
- Number of IP addresses in the network
- Number of addressable hosts in the network
- IP address range
- Broadcast address
- Min and max host
- All IP addresses
- Is an IP address in the subnet
- IPv4 ARPA domain
Provides each data in dotted quads, hexadecimal, and binary formats, as well as array of quads.
Aggregated Network Calculation Reports
- Associative array
- JSON
- String
- Printed to STDOUT
Standard Interfaces
- JsonSerializable
Setup
Add the library to your composer.json
file in your project:
Use composer to install the library:
Composer will install IPv4 Subnet Calculator inside your vendor folder. Then you can add the following to your .php files to the use library with Autoloading.
Alternatively, use composer on the command line to require and install IPv4 SubnetCalculator:
Minimum Requirements
-
PHP 7.2
Note: For PHP 5.5 through 7.1, use v3.0 (
markrogoyski/ipv4-subnet-calculator:3.*
)
Usage
Create New SubnetCalculator
Various Network Information
IP Address
Subnet Mask
Network Portion
Host Portion
Min and Max Host
All IP Addresses
Is IP Address in Subnet
Reverse DNS Lookup (ARPA Domain)
Reports
Printed Report
Array Report
JSON Report
String Report
Printing - String Representation
Standard Interfaces
JsonSerializable
Unit Tests
Standards
IPv4 Subnet Calculator (PHP) conforms to the following standards:
- PSR-1 - Basic coding standard (http://www.php-fig.org/psr/psr-1/)
- PSR-4 - Autoloader (http://www.php-fig.org/psr/psr-4/)
- PSR-12 - Extended coding style guide (http://www.php-fig.org/psr/psr-12/)
License
IPv4 Subnet Calculator (PHP) is licensed under the MIT License.