poldixd/integer-hash
最新稳定版本:0.1.1
Composer 安装命令:
composer require poldixd/integer-hash
包简介
Generates a not unique integer hash from an integer. You can set a optional max size parameter.
README 文档
README
Generates a not unique integer hash from an integer. You can set a optional max size parameter.
Usage
$int = 30211;
return integer_hash($int);
// returns 8
If you want a number that is lower than 5 use the second parameter.
$int = 30211;
return integer_hash($int, 5);
// returns 4
Example
I created this package for SEO purposes. I have an array with 5 SEO Meta Descriptions and my data in the database should choose a item from my SEO Meta Description Array by the database ID.
Known Issues
The generated Hash is different on each system! I get different results on my local computer and on the web server.
License
Integer Hash is licensed under the MIT License.
Copyright 2017 Nils Poltmann
统计信息
- 总下载量: 600
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-19