Ip final class
Minn\Support\Ip · public/minn/src/Minn/Support/Ip.php · 22 lines
Addresses with their identifying tail removed, for logs and analytics that must not keep a visitor's exact address. An IPv4 address loses its last octet, an IPv6 address its last four groups. Anything that is not an address at all reads as the unspecified IPv4 address rather than as itself, so a malformed value can never leak through unchanged.
Constants and properties
| private | UNSPECIFIED = '0.0.0.0' |
Public
| static | anonymize(string $address): string# | An address with its last octet, or its tail, zeroed. |
Nothing matches.