private static function myValidateIpAddressPart(string $ipAddressPart, ?int &$octet, ?string &$error): bool
    {
        if ($ipAddressPart === '') {
            $error = 'Octet "' . $ipAddressPart . '" is empty.';

            return false;
        }

        if (preg_match('/[^0-9]/', $ipAddressPart, $matches)) {
            $error = 'Octet "' . $ipAddressPart . '" contains invalid character "' . $matches[0] . '".';

            return false;
        }

        $octet = intval($ipAddressPart);

        if (!self::myValidateOctet($octet, $error)) {
            return false;
        }

        return true;
    }