IPAddress
in package
implements
JsonSerializable, Stringable, IEquatable
FinalYes
Table of Contents
Interfaces
- JsonSerializable
- Stringable
- IEquatable
- Provides an interface for determining the value-equality of two objects.
Constants
Methods
- __construct() : mixed
- __serialize() : array<string|int, mixed>
- __toString() : string
- __unserialize() : void
- equals() : bool
- Checks whether the current object is equal to another.
- getAddress() : string
- getCleanAddress() : string
- getRaw() : string
- getVersion() : int
- getWidth() : int
- isV4() : bool
- isV6() : bool
- jsonSerialize() : mixed
- parse() : self
Constants
UNKNOWN
public
mixed
UNKNOWN
= 0
V4
public
mixed
V4
= 4
V6
public
mixed
V6
= 6
Methods
__construct()
public
__construct(string $raw) : mixed
Parameters
- $raw : string
__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__toString()
public
__toString() : string
Return values
string__unserialize()
public
__unserialize(array<string|int, mixed> $serialized) : void
Parameters
- $serialized : array<string|int, mixed>
equals()
Checks whether the current object is equal to another.
public
equals(mixed $other) : bool
Parameters
- $other : mixed
Return values
bool —true if the objects are equals, false if not.
getAddress()
public
getAddress() : string
Return values
stringgetCleanAddress()
public
getCleanAddress() : string
Return values
stringgetRaw()
public
getRaw() : string
Return values
stringgetVersion()
public
getVersion() : int
Return values
intgetWidth()
public
getWidth() : int
Return values
intisV4()
public
isV4() : bool
Return values
boolisV6()
public
isV6() : bool
Return values
booljsonSerialize()
public
jsonSerialize() : mixed
parse()
public
static parse(string $address) : self
Parameters
- $address : string