src/_Libs/_Rand.php
public static function _randString($length, $lettersNumbersOnly = false) {
        $str = '';
        for ($i = 0; $i < $length; $i++) {
            if ($lettersNumbersOnly) {
                $str .= self::$lettersNums[self::_getRand(0, strlen(self::$lettersNums) - 1)];
            } else {
                $str .= self::_randCharacter();
            }
        }
        return $str;
    }
public static function _randString($length, $lettersNumbersOnly = false) {
        $str = '';
        for ($i = 0; $i < $length; $i++) {
            if ($lettersNumbersOnly) {
                $str .= self::$lettersNums[self::_getRand(0, strlen(self::$lettersNums) - 1)];
            } else {
                $str .= self::_randCharacter();
            }
        }
        return $str;
    }
public static function _randString ( $ length , $ lettersNumbersOnly = false ) { $ str = '' ; for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { if ( $ lettersNumbersOnly ) { $ str .= self :: $ lettersNums [ self :: _getRand ( 0 , strlen ( self :: $ lettersNums ) - 1 ) ] ; } else { $ str .= self :: _randCharacter ( ) ; } } return $ str ; }
Creates a random string of the specified length

@param int $length The length of the string
@param bool $lettersNumbersOnly Should only letters and numbers be used?
@return string A random string
Creates a random string of the specified length