original_string: public static function randomPassword($length = 8, $string = null) {
          if (!$string)
              $string = 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ123456789&^%$#@!_-+=';
          $chars = str_split(str_shuffle($string));
          $password = '';
          foreach (array_rand($chars, $length) as $key) {
              $password .= $chars[$key];
          }
          return $password;
      }
code: public static function randomPassword($length = 8, $string = null) {
          if (!$string)
              $string = 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ123456789&^%$#@!_-+=';
          $chars = str_split(str_shuffle($string));
          $password = '';
          foreach (array_rand($chars, $length) as $key) {
              $password .= $chars[$key];
          }
          return $password;
      }
code_tokens: public static function randomPassword ( $ length = 8 , $ string = null ) { if ( ! $ string ) $ string = 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ123456789&^%$#@!_-+=' ; $ chars = str_split ( str_shuffle ( $ string ) ) ; $ password = '' ; foreach ( array_rand ( $ chars , $ length ) as $ key ) { $ password .= $ chars [ $ key ] ; } return $ password ; }
docstring: Generates a random password
  @param int $length Length of the password to generate. Default is 8
  @return string
docstring_tokens: Generates a random password