src/Vxn/Helper/Str.php
public static function HashFromInt($num, int $seed = 5421087) :string
        {
            $scrambled = (324863748635 * $num + $seed) % 2654348974297586158321;

            $res = '';

            while ($scrambled) {
                $res       = self::BASE62_POOL[$scrambled % self::BASE62_BASE] . $res;
                $scrambled = intdiv($scrambled, self::BASE62_BASE);
            }

            $res = str_repeat('0', 12 - strlen($res)) . $res;

            return $res;
        }
public static function HashFromInt($num, int $seed = 5421087) :string
        {
            $scrambled = (324863748635 * $num + $seed) % 2654348974297586158321;

            $res = '';

            while ($scrambled) {
                $res       = self::BASE62_POOL[$scrambled % self::BASE62_BASE] . $res;
                $scrambled = intdiv($scrambled, self::BASE62_BASE);
            }

            $res = str_repeat('0', 12 - strlen($res)) . $res;

            return $res;
        }
public static function HashFromInt ( $ num , int $ seed = 5421087 ) : string { $ scrambled = ( 324863748635 * $ num + $ seed ) % 2654348974297586158321 ; $ res = '' ; while ( $ scrambled ) { $ res = self :: BASE62_POOL [ $ scrambled % self :: BASE62_BASE ] . $ res ; $ scrambled = intdiv ( $ scrambled , self :: BASE62_BASE ) ; } $ res = str_repeat ( '0' , 12 - strlen ( $ res ) ) . $ res ; return $ res ; }
Pseudo-random string generator can provide 62^12 unique strings
Generated string has length of 12, "z" char uses to fill generated char to 12 chars length

@param int|float $num
@param int       $seed

@return string
Pseudo - random string generator can provide 62^12 unique strings Generated string has length of 12 z char uses to fill generated char to 12 chars length