1 | <?php |
||
13 | class Tools { |
||
14 | |||
15 | const CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
16 | |||
17 | /** |
||
18 | * Generate a random string. |
||
19 | * |
||
20 | * @param int $length Fixed string length, or minimum string length if maximum is provided. |
||
21 | * @param int|null $length_max Maximum string length, optional. |
||
22 | * |
||
23 | * @return string |
||
24 | */ |
||
25 | public static function get_random_string( $length = 15, $length_max = null ) { |
||
38 | |||
39 | } |
||
40 |