Download the PHP package pjialin/ip-addr without Composer

On this page you can find all versions of the php package pjialin/ip-addr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ip-addr

IP-Addr library manages IPv4 and IPv6 addresses and subnets

Installation

Install with composer:

Installation requirements

Abstract usage example

Will output:

Used by

API

Constructor

:small_blue_diamond: v4::create | v6::create

Description
Parameters
Return values

Returns a Address object on success

Examples

:small_blue_diamond: new v4 | new v6

Description

Creates a Address instances by new operator with the same parameters as the method create.

Examples

Class

Methods

:small_blue_diamond: v4::isNumeric | v6::isNumeric
Description

Checks if the parameter value present in numeric format.

Parameters
Return values

Returns TRUE if the value in numeric format, and FALSE if not.

Examples
:small_blue_diamond: v4::isTextual | v6::isTextual
Description

Checks if the parameter value present in textual format.

Parameters
Return values

Returns TRUE if the value in textual format, and FALSE if not.

:small_blue_diamond: v4::isCIDR | v6::isCIDR
Description

Checks if the parameter value present in CIDR format.

Parameters
Return values

Returns TRUE if the value in CIDR format, and FALSE if not.

:small_blue_diamond: v4::isRange | v6::isRange
Description

Checks if the parameter value present in range format. Allows any order of addresses - direct or reverse, e.g. '10.0.0.255 - 10.0.0.0' is allowed range.

Parameters
Return values

Returns TRUE if the value in range format, and FALSE if not.

Examples

Instance

Properties

:small_orange_diamond: v4::$privateNetworks
Description

Array of private v4 networks as described in rfc1918.

:small_orange_diamond: v4::$multicastNetworks
Description

Array of multicast v4 networks as described in rfc3171.

:small_orange_diamond: v4::$reservedNetworks
Description

Array of reserved v4 networks as described in RFC 1112, Section 4.

:small_orange_diamond: v4::$networkTypes
Description

Array of associative arrays representing special-purpose v4 addresses with their descriptions, rfc5735.

:small_orange_diamond: v6::$addressTypes
Description

Array of associative arrays representing v6 address types with their descriptions, rfc4291.

Methods

:small_blue_diamond: v4::version | v6::version
Description
Return values

Returns the version number of the address of the current object.

Examples
:small_blue_diamond: v4::assign | v6::assign
Description

Assigns new address and mask values for the current object.

Parameters

See create method.

Examples
:small_blue_diamond: v4::binary | v6::binary

TODO

:small_blue_diamond: v4::decimal | v6::decimal

TODO

:small_blue_diamond: v4::hexadecimal | v6::hexadecimal

TODO

:small_blue_diamond: v4::netmask | v6::netmask

TODO

:small_blue_diamond: v4::prefixLength | v6::prefixLength

TODO

:small_blue_diamond: v4::first | v6::first

TODO

:small_blue_diamond: v4::last | v6::last

TODO

:small_blue_diamond: v4::numAddrs | v6::numAddrs

TODO

:small_blue_diamond: v4::numHosts | v6::numHosts

TODO

:small_blue_diamond: v4::hostBits | v6::hostBits

TODO

:small_blue_diamond: v4::within | v6::within

TODO

:small_blue_diamond: v4::contains | v6::contains

TODO

:small_blue_diamond: v4::addr | v6::addr

TODO

:small_blue_diamond: v4::mask | v6::mask

TODO

:small_blue_diamond: v4::cidr | v6::cidr

TODO

:small_blue_diamond: v4::range | v6::range

TODO

:small_blue_diamond: v4::reverse | v6::reverse

TODO

:small_blue_diamond: v4::reverseMask | v6::reverseMask

TODO

:small_blue_diamond: v4::netType | v6::netType

TODO

:small_blue_diamond: v4::network

TODO

:small_blue_diamond: v4::broadcast

TODO

:small_blue_diamond: v4::netClass

TODO

:small_blue_diamond: v6::full

TODO

:small_blue_diamond: v6::full4

TODO

:small_blue_diamond: v6::fullMask

TODO

:small_blue_diamond: v6::compressed

TODO

:small_blue_diamond: v6::compressed4

TODO

Array access

TODO

Iterators

Address iteration

TODO

Host iteration

TODO

Subnet iteration

TODO

Exceptions

Static methods and methods of objects can throw exceptions of the following types:

Utils Class

Methods

:small_blue_diamond: make
Description

Trying to create an object of any of the versions based on the provided arguments

Parameters

See create method.

Return values

Returns a Address object on success

Examples
:small_blue_diamond: info
Description
Parameters

addr - v4 or v6 object

Return values

Returns the array with summary information about given address.

Examples

All versions of ip-addr with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pjialin/ip-addr contains the following files

Loading the files please wait ....