previousNet_IPv6::getAddressType() (Previous) (Next) Net_IPv6::isInNetmask()next

View this page in Last updated: Sun, 05 Jul 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Net_IPv6::getNetmask()

Net_IPv6::getNetmask() – Calculates the network prefix

Synopsis

require_once 'Net/IPv6.php';

string Net_IPv6::getNetmask ( string $ip , int $bits = null )

Description

Calculates the network prefix based on the netmask bits.

Parameter

  • string $ip - the IP address in Hex format, compressed IPs are allowed

  • int $bits - if the number of netmask bits is not part of the IP, you must provide the mumber of bits

Return value

string - the network prefix

Note

This function can be called statically.

Method available since: Release 1.1.0

previousNet_IPv6::getAddressType() (Previous) (Next) Net_IPv6::isInNetmask()next

Download Documentation Last updated: Sun, 05 Jul 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.