Welcome Guest, Not a member yet? Register   Sign In
function random_string in string_helper
#1

PHP Code:
return substr(str_shuffle(str_repeat($poolceil($len strlen($pool)))), 0$len); 


Is not better with this way:    substr(str_shuffle($pool), 0, $len);
it is even faster than substr(str_shuffle(str_repeat($pool, ceil($len / strlen($pool)))), 0, $len);  ??
Reply
#2

It's not clear what your question is. What do you want to know about random_string() ?
Reply
#3

He wants to suggest changes to it.

No, these changes don't make it better.
In fact, nothing will make it better.

That function is fundamentally broken.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB