• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.