--- layout: default title: IPv4 Normalizer --- IPv4 Normalizer ======= The `League\Uri\IPv4Normalizer` is a userland PHP IPv4 Host Normalizer. ```php normalizeHost($host); echo $host; // returns 0 echo $normalizedHost; // returns 0.0.0.0 ``` Usage --------

The normalization algorithms uses the WHATWG rules to parse and format IPv4 multiple string representations into a valid IPv4 decimal representation.

### Description ```php normalizeAuthority($authority); echo $authority->getHost(); // returns '0300.0250.0000.0001' echo $normalizedAuthority->getHost(); // returns '192.168.0.1' ```