30 numbers random string in php
function rand_str() {
$characters = '0123456789-=+{}[]:;@#~.?/>,<|\!"£$%^&*()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randomstr = '';
for ($i = 0; $i < random_int(50, 100); $i++) {
$randomstr .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomstr;
}function generateRandomString($length = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
Also in PHP:
- Connecting objects PHP MYPHPSQL
- android studio clear cache
- php try catch multiple exceptions
- default header value in php
- ternary if in blade
- array_unique spip
- The key "initial" is not recognized and ignored.
- consolelog php response
- facade laravel str number
- email configuration for gmail in laravel
- How to execute “php artisan migrate” and other Laravel commands in remote server?
- create a new laravel 8 project
- check the php version in ubuntu
- date format pgp
- check if user has role twig
- find str in str php
- check if table exists sql php
- The main error reporting flags include
- clean redis cache
- array unique by keys return 1 associative array item in php
- check if string contain element php
- array_merge() does not accept unknown named parameters laravel
- Laravel DB Cache
- "Allowed memory size of 134217728 bytes exhausted (tried to allocate 56627200 bytes)" in wamp