@param int $num

@return string
495328
protected function toWords($num)
    {
        $return = '';

        if ($num === 0) {
            return BelgianDictionary::$zero;
        }

        if ($num < 0) {
            $return = BelgianDictionary::$minus . BelgianDictionary::$wordSeparator;
            $num *= -1;
        }

        $numberGroups = $this->numberToTripletsConverter->convertToTriplets($num);
        $sizeOfNumberGroups = count($numberGroups);

        foreach ($numberGroups as $i => $number) {
            // what is the corresponding exponent for the current group
            $pow = $sizeOfNumberGroups - $i;

            // skip processment for empty groups
            if ($number != '000') {
                if ($number != 1 || $pow != 2) {
                    $return .= $this->showDigitsGroup(
                        $number,
                        $i + 1 == $sizeOfNumberGroups || $pow > 2
                    ) . BelgianDictionary::$wordSeparator;
                }
                $return .= BelgianDictionary::$exponent[($pow - 1) * 3];
                if ($pow > 2 && $number > 1) {
                    $return .= BelgianDictionary::$pluralSuffix;
                }
                $return .= BelgianDictionary::$wordSeparator;
            }
        }

        return rtrim($return, BelgianDictionary::$wordSeparator);
    }
310394
public static function lowerRoman(int $num): string
    {
        $roman = static::upperRoman($num);

        return StringHelper::toLowerCase($roman);
    }
978209
public static function encodeNum($num)
        {
            $addTab = array(0=>'', 1=>'z', 2=>'Z', 3=>'+');
            $map = '0123456789abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXY';
            $mapPos = $num % 60;
            $mapAdd = (int)($num / 60);
            
            return $addTab[$mapAdd].$map[$mapPos];
        }
1334405
private function getCountString($num, $failed)
    {
        $label = "$num test";
        if ($num != 1) {
            $label .= 's';
        }

        if ($failed) {
            return $this->color('error', " $label failed");
        }

        return $this->color('success', " $label passed");
    }
1213290
protected static function getRandomBytes($num = 16)
    {
        static $which = null;
        if ($which === null) {
            if (\function_exists('\\random_bytes') && \version_compare(\phpversion(), '7.0.0', '>=')) {
                $which = 'php7';
            } elseif (\function_exists('\\openssl_random_pseudo_bytes')) {
                $which = 'openssl';
            } elseif (\function_exists('\\mcrypt_create_iv')) {
                $which = 'mcrypt';
            } elseif (\is_readable('/dev/urandom')) {
                $which = 'urandom';
            } else {
                $which = 'fallback';
            }
        }

        if ($num < 1 || $num > PHP_INT_MAX) {
            return false;
        }

        // Now let's get some random bytes
        switch ($which) {
            case 'php7':
                return \random_bytes($num);
            case 'mcrypt':
                return \mcrypt_create_iv($num, MCRYPT_DEV_URANDOM);
            case 'openssl';
                return \openssl_random_pseudo_bytes($num);
            case 'urandom':
                $fp = \fopen('/dev/urandom', 'rb');
                \stream_set_read_buffer($fp, 0);
                $bytes = \fread($fp, $num);
                \fclose($fp);
                return $bytes;
            default:
                // I really hope this is never necessary
                $bytes = '';
                for ($i = 0; $i < $num; ++$i) {
                    $bytes .= \chr(\mt_rand(0, 255) ^ \rand(0, 255));
                }

                $xorbuf = \sha1(\json_encode($_SERVER), true);
                while (self::safeStrlen($xorbuf) < $num) {
                    $xorbuf .= \sha1(
                        \uniqid(
                            \md5(
                                \microtime(true) . \lcg_value()
                            ),
                            true
                        ),
                        true
                    );
                }
                for ($i = 0; $i < $num; ++$i) {
                    $bytes[$i] ^= $xorbuf[$i];
                }

                return $bytes;
        }
    }
245446
protected static function paramToString($param)
    {
        if (is_string($param)) {
            return '"' . $param . '"';
        }

        if (is_numeric($param)) {
            return $param;
        }

        if (is_null($param)) {
            return 'NULL';
        }

        if (is_bool($param)) {
            return $param ? 'TRUE' : 'FALSE';
        }

        if (is_resource($param)) {
            return '#resource';
        }

        if (is_callable($param)) {
            if (is_string($param)) {
                return $param;
            }

            if (is_array($param)) {
                if (is_string($param[0])) {
                    return $param[0] . '::' . $param[1];
                } else {
                    return get_class($param[0]) . '->' . $param[1];
                }
            }

            return 'Closure';
        }

        if (is_array($param)) {
            return 'Array(' . count($param) . ')';
        }

        if (is_object($param)) {
            return get_class($param);
        }

        return 'unknown';
    }
791939
public static function encode($num)
    {
        $str = '';
        while ($num > 0) {
            $str = self::ALPHABET[($num % self::BASE)] . $str;
            $num = (int)($num / self::BASE);
        }
        return $str;
    }
331237
public static function getVd(int $num)
    {
        $i = 2;
        $sum = 0;

        foreach (array_reverse(str_split($num)) as $v) {
            if ($i === 8) $i = 2;
            $sum += $v * $i;
            ++$i;
        }

        $dig = 11 - ($sum % 11);

        if ($dig === 11) $dig = 0;
        if ($dig === 10) $dig = 'K';

        return $dig;
    }
515537
public function increment(string $field, int $num) : int
        {
                return intval($this->_redis->hincrby($this->_key, $field, $num));
        }
1250835
static function GetType($num)
	{
		$firstOne = substr($num,0,1);

		if (strlen($num) < 4) return "";
		if ($firstOne == 4) return "Visa";

		$firstTwo = substr($num,0,2);
		if ($firstTwo == 34 || $firstTwo == 37) return "AmEx";
		if ($firstTwo >= 51 && $firstTwo <= 55) return "MasterCard";
		if ($firstTwo == 36 || $firstTwo == 38 || $firstTwo == 54 || $firstTwo == 55) return "Diners Club";

		$firstThree = substr($num,0,3);
		if ($firstThree >= 300 && $firstThree <= 305) return "Carte Blanche";
		if ($firstThree >= 644 && $firstThree <= 649) return "Discover";

		$firstFour = substr($num,0,4);
		if ($firstFour == 6011) return "Discover";
		if ($firstFour == 2014 || $firstFour == 2149) return "enRoute";
		if ($firstFour == 6011) return "Discover";

		$firstSix = substr($num,0,6);
		if ($firstSix >= 622126 && $firstSix <= 622925) return "Discover";

		if ($firstOne == 3) return "JCB";
		if ($firstFour == 2131 || $firstFour == 1800) return "JCB";
		return "Other";
	}
930598
public function removeArgument($num)
  {
    if ($this->hasArgument($num)) {
      unset($this->arguments[$num]);
    }

    return $this->sortArguments();
  }
10060
public static function code2utf8($num) {
        if ($num < 128) {
            return chr($num);
        }
        if ($num < 2048) {
            return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
        }
        if ($num < 65536) {
            return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
        }
        if ($num < 2097152) {
            return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
        }
        return '';
    }
1061347
public static function lowerAlpha(int $num): string
    {
        $alpha = static::upperAlpha($num);

        return StringHelper::toLowerCase($alpha);
    }
53915
public function eq($num) {
        if (!$this->_isValid) {
            return $this;
        }

        if ($this->_unsafeVar != $num) {
            $this->_isValid = false;
        }
        return $this;
    }
727078
public function div(BN $num) {
        if (assert_options(ASSERT_ACTIVE)) assert(!$num->isZero());
        $res = clone($this);
        $res->bi = $res->bi->div($num->bi);
        return $res;
    }
1036724
private function get_translation_string($num) {
        $length = $this->table_translations[$num * 2 + 1];
        $offset = $this->table_translations[$num * 2 + 2];
        if (!$length)
            return '';
        fseek($this->STREAM, $offset);
        $data = fread($this->STREAM, $length);
        return (string)$data;
    }
834030
public static function quantity(int $num, int $decimals = 0) : string
    {
        if ($num >= 1000 && $num < 1000000) {
            return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000)).'K';
        } elseif ($num >= 1000000 && $num < 1000000000) {
            return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000000)).'M';
        } elseif ($num >= 1000000000) {
            return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000000000)).'B';
        }

        return $num;
    }