protected function applyIpV4Mask($ip, $maskLength)
    {
        $i = strlen($ip);
        if ($maskLength > $i) {
            $maskLength = $i;
        }

        while ($maskLength-- > 0) {
            $ip[--$i] = chr(0);
        }
        return (string)$ip;
    }
protected function applyIpV4Mask($ip, $maskLength)
    {
        $i = strlen($ip);
        if ($maskLength > $i) {
            $maskLength = $i;
        }

        while ($maskLength-- > 0) {
            $ip[--$i] = chr(0);
        }
        return (string)$ip;
    }
protected function applyIpV4Mask ( $ ip , $ maskLength ) { $ i = strlen ( $ ip ) ; if ( $ maskLength > $ i ) { $ maskLength = $ i ; } while ( $ maskLength -- > 0 ) { $ ip [ -- $ i ] = chr ( 0 ) ; } return ( string ) $ ip ; }
Apply a mask filter on the ip v4 address.

@param string $ip
@param int $maskLength
@return string
Apply a mask filter on the ip v4 address .