📜  program-generate-random-alphabets 使用 php 代码示例

📅  最后修改于: 2022-03-11 14:53:46.480000             🧑  作者: Mango

代码示例2
function rand_str() {
    $characters = '0123456789-=+{}[]:;@#~.?/>,<|\!"£$%^&*()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $randomstr = '';
    for ($i = 0; $i < random_int(50, 100); $i++) {
      $randomstr .= $characters[rand(0, strlen($characters) - 1)];
    }
    return $randomstr;
  }