-
-
Save igorpronin/54414f73a3841f07fd61ebf22f426e3a to your computer and use it in GitHub Desktop.
генерация уникальной случайной строки php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* @var Получаем текущее время в миллисекундах и случайное число | |
* и хэшируем полученную строку | |
* | |
*/ | |
$hashe = md5( microtime() . mt_rand() ); | |
# Выводим хэш | |
echo $hashe; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment